Skip to content

Commit ba6ae65

Browse files
committed
mock on
1 parent 5c0d4d4 commit ba6ae65

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy Vite React app to GitHub Pages
22

33
on:
44
push:
@@ -13,14 +13,27 @@ permissions:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
1617
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
1923
with:
2024
node-version: 20
21-
- run: npm ci
22-
- run: npm run build
23-
- uses: actions/upload-pages-artifact@v3
25+
cache: npm
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build with mocks enabled
31+
run: npm run build
32+
env:
33+
VITE_ENABLE_MOCKS: "true"
34+
35+
- name: Upload Pages artifact
36+
uses: actions/upload-pages-artifact@v3
2437
with:
2538
path: dist
2639

@@ -29,5 +42,7 @@ jobs:
2942
runs-on: ubuntu-latest
3043
environment:
3144
name: github-pages
45+
3246
steps:
33-
- uses: actions/deploy-pages@v4
47+
- name: Deploy to GitHub Pages
48+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)