Skip to content

Update deploy.yml

Update deploy.yml #8

Workflow file for this run

name: Build and Deploy to GitHub Pages
on:
push:
branches:
- main # Triggers on commits to the main branch (adjust if needed)
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x' # Specify the Node.js version you need
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm build
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the default GitHub token
run: pnpx gh-pages -d build -t true --nojekyll
- name: Cleanup
run: rm -rf build # Optional: Cleans up the build directory after deployment