Skip to content

Commit b9b6f08

Browse files
committed
build and deploy workflow
1 parent 7834bf5 commit b9b6f08

1 file changed

Lines changed: 29 additions & 15 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,45 @@ on:
66
- main
77
workflow_dispatch:
88

9-
jobs:
10-
build-and-deploy:
11-
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
1213

13-
permissions:
14-
contents: write
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
1517

18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
1621
steps:
1722
- name: Checkout repository
1823
uses: actions/checkout@v4
1924

2025
- name: Setup pnpm
2126
uses: pnpm/action-setup@v4
2227
with:
23-
version: 9
24-
25-
- name: Install dependencies
26-
run: pnpm install --frozen-lockfile
28+
version: latest
29+
run_install: true
2730

31+
- name: Setup Pages
32+
id: pages
33+
uses: actions/configure-pages@v5
2834
- name: Build project
2935
run: pnpm run build
30-
31-
- name: Deploy to gh-pages
32-
uses: peaceiris/actions-gh-pages@v4
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
3338
with:
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./dist
36-
publish_branch: gh-pages
39+
path: ./dist
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)