Skip to content

Commit 19c015b

Browse files
committed
chore[deploy]: refactor GitHub Actions workflow
1 parent c2146e4 commit 19c015b

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
contents: write
9+
contents: read
1010
pages: write
1111
id-token: write
1212

@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
build-and-deploy:
18+
build:
1919
runs-on: ubuntu-latest
2020
env:
2121
VITE_BASE_PATH: /marusya/
@@ -34,9 +34,20 @@ jobs:
3434
run: yarn install --frozen-lockfile
3535
- name: Build static export
3636
run: yarn build
37-
- name: Deploy to GitHub Pages
38-
uses: peaceiris/actions-gh-pages@v4
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
3941
with:
40-
github_token: ${{ secrets.GITHUB_TOKEN }}
41-
publish_dir: ./dist
42-
force_orphan: true
42+
path: ./dist
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)