Skip to content

Commit

Permalink
fix: add nodejs cache
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Dec 23, 2024
1 parent dcda683 commit 7a1300d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: NodeJS Cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-cache-
- name: Install Deps
run: npm install

- name: Build
run: npm run build --preset=cloudflare_pages

- uses: actions/upload-artifact@v4
with:
name: ${{env.PROJECT_NAME}}-dist
path: ./dist/

- name: Deploy
uses: cloudflare/wrangler-action@v3
# env:
Expand Down
1 change: 1 addition & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name = "rustlings"
main = "./.output/server/index.mjs"
compatibility_date = "2024-03-14"
compatibility_flags = ["nodejs_compat"]

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

0 comments on commit 7a1300d

Please sign in to comment.