Skip to content

Commit 17c1f68

Browse files
committed
CI: change deploy to github actions
1 parent d18255f commit 17c1f68

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ on:
66
- main
77

88
jobs:
9-
deploy:
9+
build:
10+
name: build
1011
runs-on: ubuntu-latest
11-
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
@@ -18,16 +18,28 @@ jobs:
1818
with:
1919
node-version: 'lts/*'
2020

21-
- name: Install deps
21+
- name: Install dependencies
2222
run: npm ci
2323

2424
- name: Build VitePress site
2525
run: npx vitepress build
2626

27-
- name: Deploy to GitHub Pages
28-
uses: peaceiris/actions-gh-pages@v4
27+
- name: Upload Build Artifact
28+
uses: actions/upload-pages-artifact@v3
2929
with:
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
publish_dir: .vitepress/dist
32-
publish_branch: gh-pages
33-
cname: ''
30+
path: .vitepress/dist
31+
32+
deploy:
33+
name: Deploy to GitHub Pages
34+
runs-on: ubuntu-latest
35+
needs: build
36+
permissions:
37+
pages: write
38+
id-token: write
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)