File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,40 +2,41 @@ name: Deploy to GitHub Pages
22
33on :
44 push :
5- branches :
6- - main
5+ branches : [main]
76 workflow_dispatch :
87
98permissions :
10- contents : write
9+ contents : read
10+ pages : write
11+ id-token : write
1112
1213jobs :
13- build-and-deploy :
14+ build :
1415 runs-on : ubuntu-latest
15-
1616 steps :
17- - name : Checkout repository
18- uses : actions/checkout@v4
17+ - uses : actions/checkout@v4
1918
20- - name : Setup pnpm
21- uses : pnpm/action-setup@v4
19+ - uses : pnpm/action-setup@v4
2220 with :
2321 version : 10
2422
25- - name : Setup Node.js
26- uses : actions/setup-node@v4
23+ - uses : actions/setup-node@v4
2724 with :
28- node-version : ' 24'
29-
30- - name : Install dependencies
31- run : pnpm install
25+ node-version : 24
3226
33- - name : Build Motrix page
34- run : pnpm --filter @workspace/motrix-page run build
27+ - run : pnpm install
28+ - run : pnpm --filter @workspace/motrix-page run build
3529
36- - name : Deploy to GitHub Pages
37- uses : peaceiris/actions-gh-pages@v4
30+ - uses : actions/upload-pages-artifact@v3
3831 with :
39- github_token : ${{ secrets.GITHUB_TOKEN }}
40- publish_dir : ./artifacts/motrix-page/dist
41- cname : ' '
32+ path : ./artifacts/motrix-page/dist
33+
34+ deploy :
35+ needs : build
36+ runs-on : ubuntu-latest
37+ environment :
38+ name : github-pages
39+ url : ${{ steps.deployment.outputs.page_url }}
40+ steps :
41+ - uses : actions/deploy-pages@v4
42+ id : deployment
You can’t perform that action at this time.
0 commit comments