diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e29e79..3f68d14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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') }} @@ -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 diff --git a/script/prepare-cloudflare.sh b/script/prepare-cloudflare.sh index f537a62..bb14363 100755 --- a/script/prepare-cloudflare.sh +++ b/script/prepare-cloudflare.sh @@ -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