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 bb3ca61
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ 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/
run: npm run build

- name: Deploy
uses: cloudflare/wrangler-action@v3
Expand All @@ -46,7 +50,7 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./.output --project-name "${{ env.PROJECT_NAME }}"
command: pages deploy ./dist --project-name "${{ env.PROJECT_NAME }}"
# secrets: |
# YOUR_SECRET
# YOUR_OTHER_SECRET

0 comments on commit bb3ca61

Please sign in to comment.