28 lines
667 B
YAML
28 lines
667 B
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # Or your default branch
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # Allows gh-pages to push to the gh-pages branch
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20' # Or your preferred Node.js version
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Deploy to GitHub Pages
|
|
run: npm run deploy
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # gh-pages needs this to push |