Skip to content

Commit 0290553

Browse files
committed
update workflow deplay-pages
1 parent d582297 commit 0290553

1 file changed

Lines changed: 22 additions & 14 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,44 @@ on:
55
push:
66
branches: [master]
77

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
138
concurrency:
149
group: "pages"
1510
cancel-in-progress: false
1611

1712
jobs:
1813
build:
14+
name: Build
1915
runs-on: ubuntu-latest
2016
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-node@v4
17+
- name: Checkout the repository
18+
uses: actions/checkout@v4
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
2321
with:
24-
node-version-file: .nvmrc
25-
cache: yarn
26-
- run: yarn install
27-
- run: yarn build
28-
- uses: actions/upload-pages-artifact@v3
22+
node-version-file: '.nvmrc'
23+
cache: 'yarn'
24+
- name: Install Yarn dependencies
25+
run: yarn --immutable
26+
- name: Run build script
27+
run: yarn build
28+
- name: Upload Pages artifact
29+
uses: actions/upload-pages-artifact@v3
2930
with:
3031
path: dist
3132

3233
deploy:
34+
name: Deploy
35+
needs: build
36+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
37+
permissions:
38+
pages: write # to deploy to Pages
39+
id-token: write # to verify the deployment originates from an appropriate source
40+
# Deploy to the github-pages environment
3341
environment:
3442
name: github-pages
3543
url: ${{ steps.deployment.outputs.page_url }}
3644
runs-on: ubuntu-latest
37-
needs: build
3845
steps:
39-
- uses: actions/deploy-pages@v4
46+
- name: Deploy to GitHub Pages
4047
id: deployment
48+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)