Skip to content

Commit 6750e33

Browse files
committed
workflow
1 parent 03aaa4f commit 6750e33

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

.github/workflows/deploy.yml

+6-26
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
1-
name: Deploy Vite App to GitHub Pages
1+
name: Deploy Vite React to GitHub Pages
22

33
on:
44
push:
55
branches: [main]
66
workflow_dispatch:
77

8-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9-
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
13-
14-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15-
concurrency:
16-
group: 'pages'
17-
cancel-in-progress: false
18-
198
jobs:
209
build-and-deploy:
21-
environment:
22-
name: github-pages
23-
url: ${{ steps.deployment.outputs.page_url }}
2410
runs-on: ubuntu-latest
2511

2612
steps:
@@ -30,22 +16,16 @@ jobs:
3016
- name: Set up Node.js
3117
uses: actions/setup-node@v3
3218
with:
33-
node-version: '18'
19+
node-version: 18
3420

3521
- name: Install dependencies
3622
run: npm ci
3723

3824
- name: Build
3925
run: npm run build
4026

41-
- name: Setup Pages
42-
uses: actions/configure-pages@v3
43-
44-
- name: Upload artifact
45-
uses: actions/upload-pages-artifact@v2
46-
with:
47-
path: './dist'
48-
4927
- name: Deploy to GitHub Pages
50-
id: deployment
51-
uses: actions/deploy-pages@v2
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./dist

0 commit comments

Comments
 (0)