Skip to content

Commit 1a80c18

Browse files
committed
update ci pipeline
1 parent 4756a45 commit 1a80c18

2 files changed

Lines changed: 70 additions & 70 deletions

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: Build
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
8-
workflow_dispatch:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch:
99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- name: Install Node.js
15-
uses: actions/setup-node@v4
16-
with:
17-
node-version: 16.x
18-
- name: Install dependencies
19-
run: npm install
20-
- name: Build
21-
run: npm run build
22-
- name: Test
23-
run: npm test
24-
- name: Build standalone
25-
run: npm run build-standalone-prod
26-
- name: Upload standalone artifact
27-
uses: actions/upload-artifact@v4
28-
with:
29-
name: standalone
30-
path: dist/standalone.html
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Install Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20.x
18+
- name: Install dependencies
19+
run: npm i -g pnpm@v11 && pnpm up && pnpm i --shamefully-hoist
20+
- name: Build
21+
run: pnpm run build
22+
- name: Test
23+
run: npm test
24+
- name: Build standalone
25+
run: npm run build-standalone-prod
26+
- name: Upload standalone artifact
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: standalone
30+
path: dist/standalone.html

.github/workflows/deploy.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
name: Deploy to GitHub Pages
22
env:
3-
GITHUB_TOKEN: ${{ secrets.t }}
3+
GITHUB_TOKEN: ${{ secrets.t }}
44
on:
5-
workflow_dispatch:
6-
repository_dispatch:
7-
push:
5+
workflow_dispatch:
6+
repository_dispatch:
7+
push:
88

99
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
10+
contents: read
11+
pages: write
12+
id-token: write
1313

1414
concurrency:
15-
group: "deploy"
16-
cancel-in-progress: true
15+
group: "deploy"
16+
cancel-in-progress: true
1717

1818
jobs:
19-
build:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
- name: Setup GitHub Pages
25-
id: pages
26-
uses: actions/configure-pages@v4
27-
- name: Install Node.js
28-
uses: actions/setup-node@v4
29-
with:
30-
node-version: 16.x
31-
- name: Install dependencies
32-
run: npm i -g pnpm@v6 && pnpm up && pnpm i --shamefully-hoist
33-
- name: Build
34-
run: npm run build
35-
env:
36-
NODE_ENV: production
37-
ENABLE_SERVICE_WORKER: 1
38-
- name: Test
39-
run: npm test
40-
- name: Upload artifact
41-
uses: actions/upload-pages-artifact@v3
42-
with:
43-
path: ./dist/
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Setup GitHub Pages
25+
id: pages
26+
uses: actions/configure-pages@v4
27+
- name: Install Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 20.x
31+
- name: Install dependencies
32+
run: npm i -g pnpm@v11 && pnpm up && pnpm i --shamefully-hoist
33+
- name: Build
34+
run: pnpm run build
35+
env:
36+
NODE_ENV: production
37+
ENABLE_SERVICE_WORKER: 1
38+
- name: Test
39+
run: npm test
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: ./dist/
4444

45-
deploy:
46-
environment:
47-
name: github-pages
48-
url: ${{ steps.deployment.outputs.page_url }}
49-
runs-on: ubuntu-latest
50-
needs: build
51-
steps:
52-
- name: Deploy to GitHub Pages
53-
id: deployment
54-
uses: actions/deploy-pages@v4
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)