Skip to content

Commit

Permalink
tweaks and added image cache to preview
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 committed Aug 3, 2024
1 parent 5777d86 commit cdc24dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
node-version: 20
cache: pnpm

# Image cache setup
- name: Setup Image cache
uses: actions/cache@v4
with:
path: "**/node_modules/.cache/imagetools"
key: ${{ runner.os }}-image-cache-${{ hashFiles('**/src/lib/img') }}

- name: Install dependencies
run: pnpm install

Expand All @@ -30,4 +37,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: preview-build
path: build
path: sites/docs/.svelte-kit/cloudflare
4 changes: 2 additions & 2 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
id: preview-build-artifact
with:
name: preview-build
path: build
Expand All @@ -32,6 +33,5 @@ jobs:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: shadcn-svelte
directory: ./.svelte-kit/cloudflare
workingDirectory: sites/docs
deploymentName: Preview
directory: ${{ steps.preview-build-artifact.outputs.download-path }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
node-version: 20
cache: pnpm

# Image cache setup
# Image cache setup
- name: Setup Image cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules/.cache/imagetools"
key: ${{ runner.os }}-image-cache-${{ hashFiles('**/src/lib/img') }}
Expand Down

0 comments on commit cdc24dc

Please sign in to comment.