Files
managing-apps/.github/workflows/caprover.yml
2024-07-13 03:15:42 +07:00

39 lines
1022 B
YAML

name: Build & Deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Build and test your app (customize as needed)
run: |
# Add your build and test commands here
# For example:
# npm install
# npm run build
# npm run test
- name: Create deploy.tar
uses: a7ul/tar-action@v1.1.0
with:
command: c
cwd: "./"
files: |
scripts/build_and_run.sh
captain-definition
outPath: deploy.tar
- name: Deploy App to CapRover
uses: caprover/deploy-from-github@v1.0.1
with:
server: '${{ secrets.CAPROVER_SERVER }}'
app: '${{ secrets.APP_NAME }}'
token: '${{ secrets.MANAGING_APPS }}'