Skip to content

Fixed a syntax error #36

Fixed a syntax error

Fixed a syntax error #36

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- portfolio # <--- Trigger deployment on pushes to "portfolio"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.3.0'
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build # → this calls `vite build --mode production` (as defined in package.json)
- name: List dist contents
run: ls -laR ./dist
- name: Upload dist as artifact
uses: actions/upload-artifact@v4 # <-- Not deprecated!
with:
name: pages-artifact # <-- A name for the artifact
path: './dist' # <-- The build output
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # Required to deploy to GitHub Pages
id-token: write # Required for OIDC token usage
steps:
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: pages-artifact # <-- Must match the name used above
# path: dist # <-- Download into a "dist" folder
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1 # <-- Official GH Pages deployment action
with:
artifact_name: pages-artifact
token: ${{ secrets.GITHUB_TOKEN }}