Skip to content

Commit

Permalink
Do not use cloudflare action
Browse files Browse the repository at this point in the history
  • Loading branch information
ericyd committed Nov 18, 2022
1 parent c471062 commit eb5ad14
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 235 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ jobs:
- name: Compile
run: npm run build

# Cloudflare has a custom action to run wrangler commands: cloudflare/wrangler-action@2.0.0
# However, it interfers with the actions/cache command.
# It appears to create a `.wrangler` directory which cannot be scanned.
# The GitHub Actions debug log had this error:
# Error: EACCES: permission denied, scandir '/home/runner/work/loop-supreme/loop-supreme/.wrangler'
# Since wrangler is already a dependency, we can skip the custom action and just run the command directly
- name: Publish
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages publish build --project-name=loopsupreme
run: CLOUDFLARE_API_TOKEN=${{ secrets.CF_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID=${{ secrets.CF_ACCOUNT_ID }} npm run pages publish build -- --project-name=loopsupreme
Loading

0 comments on commit eb5ad14

Please sign in to comment.