Skip to content

Commit 7e9ff0c

Browse files
authored
Update build.yml
1 parent b2ec644 commit 7e9ff0c

1 file changed

Lines changed: 33 additions & 31 deletions

File tree

.github/workflows/build.yml

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
1-
name: Build
1+
name: Build and Deploy to GitHub Pages
22

33
on:
44
push:
55
branches:
66
- main
77

88
jobs:
9-
build:
9+
build-and-deploy:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pages: write
14+
id-token: write
15+
environment:
16+
name: github-pages
17+
url: ${{ steps.deployment.outputs.page_url }}
1118

1219
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v4
20+
- name: Checkout code 🛎️
21+
uses: actions/checkout@v4
1522

16-
- name: Setup Node.js
17-
uses: actions/setup-node@v4
18-
with:
19-
node-version: '20'
20-
cache: 'npm'
23+
- name: Setup Node.js ⚙️
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
cache: 'npm'
2128

22-
- name: Skip Scripts Install
23-
run: npm i --skip-scripts
29+
- name: Skip Scripts Install 📦
30+
run: npm i --skip-scripts
2431

25-
- name: Install cross-fetch
26-
run: npm i cross-fetch
32+
- name: Install cross-fetch 📦
33+
run: npm i cross-fetch
2734

28-
- name: Install dependencies
29-
run: npm i
35+
- name: Install dependencies 📦
36+
run: npm i
3037

31-
32-
- name: Build
33-
run: npm run build
38+
- name: Build 🏗️
39+
run: npm run build
3440

35-
- name: Zip dist
36-
run: zip -r files.zip ./
41+
- name: Setup Pages 📄
42+
uses: actions/configure-pages@v5
3743

38-
- name: Setup Pages
39-
uses: actions/configure-pages@v5
40-
41-
- name: Upload artifact
42-
uses: actions/upload-artifact@v4
43-
with:
44-
path: ./build
45-
46-
- name: Deploy 💥
47-
id: deployment
48-
uses: actions/deploy-pages@v4
44+
- name: Upload artifact 📤
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: ./build
4948

49+
- name: Deploy to GitHub Pages 🚀
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)