Update jekyll-gh-pages.yml #6
This file contains 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 Frontend to GitHub Pages | |
on: | |
push: | |
branches: ["main"] # Change to your branch name if needed | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' # Update to your desired Node.js version | |
- name: Change directory to frontend | |
uses: actions/checkout@v4 # Checkout the specific directory (optional) | |
- working-directory: frontend # Set working directory for subsequent steps | |
run: | | |
npm install # Install dependencies within the frontend folder | |
npm run build # Build the frontend project | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
source: ./dist # Update path if your build output is in a different folder | |
branch: gh-pages # Change to your desired branch for deployment (optional) |