Skip to content

Update prepare script to include npm run build #65

Update prepare script to include npm run build

Update prepare script to include npm run build #65

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
VITE_DEFAULT_EXCEL_ID: ${{ vars.VITE_DEFAULT_EXCEL_ID }}
ROOT_BASE_URL: ${{ vars.ROOT_BASE_URL }}
jobs:
CI:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Node
uses: actions/setup-node@v5
with:
node-version: lts/*
- name: Install font
run: sudo npm run install-font
- name: Setup Yarn
run: npm install -g yarn
- name: Install dependencies
run: |
yarn install --frozen-lockfile
yarn playwright install --with-deps
- name: Type check
run: yarn type-check
- name: Lint
run: yarn lint
- name: Unit test
run: yarn coverage --verbose --debug
- name: Upload coverage
if: github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v5
with:
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}
- name: E2E tests
run: yarn e2e
env:
CI: true
- name: Upload Playwright test report
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 5
- name: Build
run: yarn build
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/demo/frontend/dist
- name: Verify deployment
if: github.ref == 'refs/heads/main'
run: |
echo "Waiting 20 seconds for deployment to propagate..."
sleep 20
echo "Checking if site is accessible..."
response=$(curl -sL https://nusr.github.io/excel)
if echo "$response" | grep -q "excel/assets"; then
echo "✓ Deployment successful!"
else
echo "✗ Deployment check failed!"
exit 1
fi