Skip to content

Commit 087a493

Browse files
committed
Refactor GitHub Actions workflow for frontend deployment
1 parent 206cc32 commit 087a493

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

.github/workflows/frontend.yml

+30-30
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@
44
name: Deploy frontend to Pages
55

66
on:
7-
push:
8-
branches: [ "main" ]
9-
pull_request:
10-
branches: [ "main" ]
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
branches: ["main"]
1111

1212
jobs:
13-
build:
13+
build:
14+
runs-on: ubuntu-latest
1415

15-
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x, 22.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1620

17-
strategy:
18-
matrix:
19-
node-version: [18.x, 20.x, 22.x]
20-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm run build
30-
working-directory: frontend
31-
- name: Setup Pages
32-
uses: actions/configure-pages@v5
33-
- name: Upload artifact
34-
uses: actions/upload-pages-artifact@v3
35-
with:
36-
# Upload entire repository
37-
path: 'frontend/dist'
38-
- name: Deploy to GitHub Pages
39-
id: deployment
40-
uses: actions/deploy-pages@v4
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
working-directory: frontend
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: "npm"
29+
- run: npm run build
30+
working-directory: frontend
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
# Upload entire repository
37+
path: "frontend/dist"
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)