Skip to content

Merge pull request #90 from AnuKritiW/cleanup #16

Merge pull request #90 from AnuKritiW/cleanup

Merge pull request #90 from AnuKritiW/cleanup #16

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main] # runs after a PR is merged to main
paths:
- 'src/**' # app code
- 'public/**' # static assets
- 'index.html' # Vite entry
- 'vite.config.ts' # build config
- 'package.json' # deps/scripts can change output
- 'package-lock.json' # lockfile updates can change output
- 'tsconfig*.json' # TS config may affect build
workflow_dispatch: {} # manual redeploy when needed
permissions:
contents: write # needed to push to gh-pages
concurrency:
group: gh-pages-deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # gh-pages sometimes needs history
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install deps
run: npm ci
- name: Build
run: npm run build
# retrieved from https://github.com/orgs/community/discussions/26560
- name: Git identity (use bot)
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Deploy (gh-pages)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run deploy