Skip to content

Commit 599e50c

Browse files
committed
build: update ghp workflow
1 parent 0f781a0 commit 599e50c

File tree

1 file changed

+22
-25
lines changed

1 file changed

+22
-25
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,47 @@
1-
name: Deploy React App to GitHub Pages
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches: ['main']
5+
branches:
6+
- main
7+
68
workflow_dispatch:
79

810
permissions:
911
contents: read
1012
pages: write
1113
id-token: write
1214

13-
concurrency:
14-
group: 'pages'
15-
cancel-in-progress: true
16-
1715
jobs:
18-
deploy:
19-
environment:
20-
name: github-pages
21-
url: ${{ steps.deployment.outputs.page_url }}
16+
build:
2217
runs-on: ubuntu-latest
23-
2418
steps:
2519
- name: Checkout repository
26-
uses: actions/checkout@v3
27-
28-
- name: Set up Node.js
29-
uses: actions/setup-node@v3
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
3024
with:
31-
node-version: '20.x'
32-
cache: 'npm'
25+
node-version: 22
3326

3427
- name: Install dependencies
3528
run: npm install
3629

37-
- name: Build the React app
30+
- name: Build project
3831
run: npm run build
3932

40-
- name: Configure GitHub Pages
41-
uses: actions/configure-pages@v3
42-
4333
- name: Upload artifact
44-
uses: actions/upload-pages-artifact@v1
34+
uses: actions/upload-pages-artifact@v3
4535
with:
46-
path: './dist'
47-
36+
path: ./dist
37+
38+
deploy:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
steps:
4845
- name: Deploy to GitHub Pages
4946
id: deployment
50-
uses: actions/deploy-pages@v1
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)