welp #4
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
| # Deploy Workflow - Copy to .github/workflows/deploy.yml to activate | |
| # | |
| # Prerequisites: | |
| # 1. Set up a self-hosted GitHub Actions runner on EC2 | |
| # 2. Runner must have access to: pnpm, pm2, and the app directory | |
| # | |
| # Triggers on push to main, runs CI first, then deploys on success. | |
| name: Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| name: Deploy to Production | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy to production | |
| run: ./deployment/deploy.sh | |
| env: | |
| NODE_ENV: production |