Repository navigation
ci(deploy): deploy to Render via deploy hook instead of Fly #42
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: | |
| test: | |
| uses: ./.github/workflows/ci.yml | |
| deploy: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger Render deploy | |
| env: | |
| RENDER_DEPLOY_HOOK_URL: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} | |
| run: | | |
| if [ -z "$RENDER_DEPLOY_HOOK_URL" ]; then | |
| echo "::error::RENDER_DEPLOY_HOOK_URL secret is not set." \ | |
| "Add it under repo Settings > Secrets and variables > Actions" \ | |
| "(get the URL from the Render service > Settings > Deploy Hook)." | |
| exit 1 | |
| fi | |
| echo "CI passed; triggering Render deploy..." | |
| curl -fsS -X POST "$RENDER_DEPLOY_HOOK_URL" | |
| echo "Render deploy triggered." |