Skip to content

feat: surface unclassified income categories in settings (#224) #218

feat: surface unclassified income categories in settings (#224)

feat: surface unclassified income categories in settings (#224) #218

name: Deploy Frontend to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch: # Allow manual trigger
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
# No `version:` here -- action-setup reads it from the root
# package.json `packageManager` field (pnpm@11.10.0). Pinning a
# second version conflicts with packageManager (ERR_PNPM_BAD_PM_VERSION).
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: '24'
- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache pnpm dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ env.STORE_PATH }}
key: pnpm-${{ runner.os }}-${{ hashFiles('frontend/pnpm-lock.yaml') }}
restore-keys: pnpm-${{ runner.os }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Build
env:
GITHUB_PAGES: 'true'
VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }}
run: pnpm run build
# SPA routing: copy index.html to 404.html so GitHub Pages
# serves the app for all routes instead of a 404 page.
- name: Copy index.html to 404.html for SPA routing
run: cp dist/index.html dist/404.html
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: frontend/dist
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5