fix: deploying actions must be implemented by user

This commit is contained in:
2024-11-24 21:27:51 -03:00
parent 5a8c4c1b1a
commit cf9a2882d3

View File

@@ -1,45 +0,0 @@
name: "Caprover: Build & Deploy (backup-databases)"
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
#env:
# API_URL: ${{ github.ref_name == 'main' && vars.API_URL && vars.API_URL || vars.DEV_API_URL }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Switch to branch ${{ github.ref_name }}
uses: actions/checkout@v4
- name: Pack app contents
run: |
tar -czv \
-f deploy.tar \
./captain-definition \
./Dockerfile \
./scripts
- name: Deploy webapp to development
if: github.ref_name == 'dev'
uses: caprover/deploy-from-github@v1.0.1
with:
server: "${{ vars.DEV_CAPROVER_SERVER || vars.CAPROVER_SERVER }}"
app: "${{ vars.DEV_APP_NAME || vars.APP_NAME }}"
token: "${{ secrets.DEV_APP_TOKEN }}"
- name: Deploy webapp to production
if: github.ref_name == 'main'
uses: caprover/deploy-from-github@v1.0.1
with:
server: "${{ vars.CAPROVER_SERVER }}"
app: "${{ vars.APP_NAME }}"
token: "${{ secrets.APP_TOKEN }}"