-
-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (41 loc) · 1.12 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 8
# pnpm has to be installed before node to make use of caching
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm prepare
- run: pnpm typecheck
- run: pnpm generate
- name: Check if 200.html exists
run: |
if [ ! -f "dist/200.html" ]; then
echo "200.html does not exist."
exit 1
fi
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: portfolio-report/pr-www-pages
publish_dir: ./dist