Created
January 12, 2022 19:51
-
-
Save abh006/cf3e92b4171c398660ae9ec38858b719 to your computer and use it in GitHub Desktop.
Github Action Files | Caprover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set affected branch name | |
id: vars | |
run: echo ::set-output name=BRANCH_NAME::${GITHUB_REF#refs/*/} | |
- name: Install CapRover | |
run: npm i -g caprover | |
- name: Deploy to CapRover | |
run: caprover deploy -h "$SERVER" -p "$CAPROVER_PASSWORD" -b "$BRANCH_NAME" -a "$APP_NAME" | |
shell: bash | |
env: | |
SERVER: https://captain.your.domain.name | |
CAPROVER_PASSWORD: <caprover-password> | |
APP_NAME: <app-name-in-caprover> | |
BRANCH_NAME: ${{ steps.vars.outputs.BRANCH_NAME }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment