Merge pull request #6 from rmodi6/staging #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
| name: Deploy Production Site | |
| # Trigger on pushes to the main branch | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Check out the code from the main branch | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| # Step 2: Deploy to gh-pages branch (root directory) | |
| - name: Deploy to Production | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated by GitHub | |
| publish_branch: gh-pages # Branch to deploy to | |
| publish_dir: . # Directory with built files (use _site for Jekyll/Hugo) | |
| destination_dir: . # Deploy to root of gh-pages | |
| force_orphan: true # Keep gh-pages clean (only built files) |