Created
April 12, 2026 16:50
-
-
Save nktstudios/c167574d94ab4ab64836df509bcbaa73 to your computer and use it in GitHub Desktop.
GitHub Actions Demo full deploy.yml file.
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
| # This should be created in the directory .github/workflows. | |
| name: CI/CD Github Actions Demo Workflow | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: {} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run tests | |
| run: pytest | |
| deploy: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Trigger Render deploy | |
| run: | | |
| curl -X POST "${{ secrets.RENDER_DEPLOY_HOOK }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment