-
Notifications
You must be signed in to change notification settings - Fork 4
97 lines (77 loc) · 2.18 KB
/
pl-fe.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: pl-fe CI
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-latest
name: Test and upload artifacts
strategy:
matrix:
node-version: [22.x]
steps:
- name: Install system dependencies
run: sudo apt install -y unzip
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install deps
working-directory: ./packages/pl-fe
run: yarn install --ignore-scripts
- name: Lint
working-directory: ./packages/pl-fe
run: yarn lint
- name: build
env:
NODE_ENV: production
working-directory: ./packages/pl-fe
run: |
yarn build
cp dist/index.html dist/404.html
- name: i18n
working-directory: ./packages/pl-fe
run: |
yarn i18n
git diff
git diff --quiet || (echo "Locale files are out of date. Please run \`yarn i18n\`" && exit 1)
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pl-fe
path: packages/pl-fe/dist
- name: Include archive
working-directory: ./packages/pl-fe/dist
run: zip -r pl-fe.zip .
- name: Install pl-api deps
working-directory: ./packages/pl-api
run: yarn install --ignore-scripts
- name: Build pl-api documentation
working-directory: ./packages/pl-api
run: npx typedoc
- name: Copy pl-api documentation
working-directory: ./packages/pl-api
run: cp docs ../pl-fe/dist/pl-api-docs -r
- name: Upload Github Pages artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: packages/pl-fe/dist
deploy:
needs: build
if: github.ref == 'refs/heads/develop'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4