Manual Heroku Deploy #1
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: Manual Heroku Deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Branch to deploy' | |
| required: true | |
| default: 'main' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true # <-- fetch submodules too | |
| ref: ${{ github.event.inputs.branch }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22.x' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project (optional) | |
| run: npm run build | |
| - name: Deploy to Heroku | |
| env: | |
| HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
| run: | | |
| git remote add heroku https://heroku:[email protected]/<your-app-name>.git | |
| git push heroku HEAD:main --force |