Skip to content

Commit cba5063

Browse files
authored
Merge pull request #22 from unlibra/ci/github-pages-source
Update deploy-website workflow to use GitHub Actions source
2 parents cea0220 + 203d851 commit cba5063

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

.github/workflows/deploy-website.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ on:
99
- '.github/workflows/deploy-website.yml'
1010

1111
permissions:
12-
contents: write
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
1319

1420
jobs:
15-
deploy:
16-
name: Deploy to GitHub Pages
21+
build:
22+
name: Build
1723
runs-on: ubuntu-latest
1824
defaults:
1925
run:
@@ -28,14 +34,28 @@ jobs:
2834
cache: 'npm'
2935
cache-dependency-path: website/package-lock.json
3036

37+
- name: Setup Pages
38+
uses: actions/configure-pages@v5
39+
3140
- name: Install dependencies
3241
run: npm ci
3342

3443
- name: Build
3544
run: npm run build
3645

37-
- name: Deploy
38-
uses: peaceiris/actions-gh-pages@v3
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
3948
with:
40-
github_token: ${{ secrets.GITHUB_TOKEN }}
41-
publish_dir: ./website/build
49+
path: ./website/build
50+
51+
deploy:
52+
name: Deploy to GitHub Pages
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)