mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
- Added a step to build the web application using Vite, replacing the previous build command. - Updated the workflow to ensure the correct generation of routes during the build process. Signed-off-by: Innei <tukon479@gmail.com>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [lts/*]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Cache pnpm modules
|
|
uses: actions/cache@v4
|
|
env:
|
|
cache-name: cache-pnpm-modules
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
run_install: true
|
|
- run: echo '{"version":"v2","data":[]}' > apps/web/src/data/photos-manifest.json
|
|
- name: Build web (generates routes)
|
|
run: pnpm exec vite build
|
|
working-directory: ./apps/web
|
|
- name: Type check
|
|
run: |
|
|
pnpm type-check
|