Skip to content

Update and rename jekyll-gh-pages.yml to gh.yml #1

Update and rename jekyll-gh-pages.yml to gh.yml

Update and rename jekyll-gh-pages.yml to gh.yml #1

Workflow file for this run

name: Deploy Frontend to GitHub Pages
on:
push:
branches: ["main"] # Change to your branch name if needed
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write # Ensure this permission is granted to your token
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 (optional)
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:
token: ${{ secrets.GITHUB_TOKEN }} # Use the secret name where your token is stored
source: ./dist # Update path if your build output is in a different folder
branch: gh-pages # Change to your desired branch for deployment (optional)