Skip to content

Commit bb3ca61

Browse files
committed
fix: add nodejs cache
1 parent dcda683 commit bb3ca61

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,20 @@ jobs:
2727
steps:
2828
- name: Checkout
2929
uses: actions/checkout@v4
30+
31+
- name: NodeJS Cache
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.npm
35+
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
36+
restore-keys: |
37+
${{ runner.OS }}-npm-cache-
38+
3039
- name: Install Deps
3140
run: npm install
3241

3342
- name: Build
34-
run: npm run build --preset=cloudflare_pages
35-
36-
- uses: actions/upload-artifact@v4
37-
with:
38-
name: ${{env.PROJECT_NAME}}-dist
39-
path: ./dist/
43+
run: npm run build
4044

4145
- name: Deploy
4246
uses: cloudflare/wrangler-action@v3
@@ -46,7 +50,7 @@ jobs:
4650
with:
4751
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4852
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
49-
command: pages deploy ./.output --project-name "${{ env.PROJECT_NAME }}"
53+
command: pages deploy ./dist --project-name "${{ env.PROJECT_NAME }}"
5054
# secrets: |
5155
# YOUR_SECRET
5256
# YOUR_OTHER_SECRET

0 commit comments

Comments
 (0)