Skip to content

Commit 7a1300d

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

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,21 @@ 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
3443
run: npm run build --preset=cloudflare_pages
3544

36-
- uses: actions/upload-artifact@v4
37-
with:
38-
name: ${{env.PROJECT_NAME}}-dist
39-
path: ./dist/
40-
4145
- name: Deploy
4246
uses: cloudflare/wrangler-action@v3
4347
# env:

wrangler.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name = "rustlings"
22
main = "./.output/server/index.mjs"
33
compatibility_date = "2024-03-14"
4+
compatibility_flags = ["nodejs_compat"]
45

56
rules = [
67
{ type = "ESModule", globs = ["**/*.js", "**/*.mjs"]},

0 commit comments

Comments
 (0)