Merge pull request #1098 from gmmcal/reusable #809
This file contains 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 | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
release: | ||
types: [published] | ||
jobs: | ||
build_production: | ||
name: 'Build: Production' | ||
uses: gmmcal/gmmcal.com.br/.github/workflows/docker.yml@reusable | ||
Check failure on line 15 in .github/workflows/deploy.yml GitHub Actions / .github/workflows/deploy.ymlInvalid workflow file
|
||
secrets: inherit | ||
with: | ||
target: production | ||
build_development: | ||
name: 'Build: Development' | ||
uses: gmmcal/gmmcal.com.br/.github/workflows/docker.yml@reusable | ||
secrets: inherit | ||
with: | ||
target: development | ||
if: github.event_name == 'push' | ||
deploy_staging: | ||
name: 'Deploy: Staging' | ||
runs-on: ubuntu-20.04 | ||
needs: build_production | ||
steps: | ||
- name: Deploy | ||
env: | ||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY_STAGING }} | ||
DEPLOY_SERVICE: ${{ secrets.DEPLOY_SERVICE_STAGING }} | ||
run: | | ||
curl -v "https://api.render.com/deploy/srv-$DEPLOY_SERVICE?key=$DEPLOY_KEY&ref=$GITHUB_SHA" | ||
deploy_production: | ||
name: 'Deploy: Production' | ||
runs-on: ubuntu-20.04 | ||
needs: deploy_staging | ||
if: github.event_name != 'push' | ||
steps: | ||
- name: Deploy | ||
env: | ||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY_PRODUCTION }} | ||
DEPLOY_SERVICE: ${{ secrets.DEPLOY_SERVICE_PRODUCTION }} | ||
run: | | ||
curl -v "https://api.render.com/deploy/srv-$DEPLOY_SERVICE?key=$DEPLOY_KEY&ref=$GITHUB_SHA" |