Skip to content

Commit

Permalink
Actions: Replace pages-action with wrangler-action
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed May 15, 2024
1 parent 60b17a8 commit 158dca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
node-version: 20
- name: Setup cache for Node.js
id: cache-npm
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package.json') }}
Expand Down Expand Up @@ -81,10 +81,8 @@ jobs:
working-directory: _site

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: ibug-web
directory: _site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
command: pages deploy _site --project-name=ibug-web
5 changes: 3 additions & 2 deletions script/prepare-cloudflare.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

git clone --depth=1 --branch=master --single-branch https://github.com/iBug/image.git image
rm -rf image/.git CNAME .nojekyll LICENSE.md README.md
wget -O - https://github.com/iBug/image/archive/master.tar.gz | tar zxf -
mv -f image-master image
rm -f CNAME .nojekyll LICENSE.md README.md

0 comments on commit 158dca2

Please sign in to comment.