Skip to content

Commit

Permalink
update ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
seadfeng committed Aug 23, 2024
1 parent d6fe3ac commit 6601d8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}")
if [ $response -eq 404 ]; then
echo "Project does not exist, creating..."
npx wrangler pages project create favicon --production-branch ${{ github.ref_name }}
npx wrangler pages project create favicon --production-branch main
else
echo "Project exists, skipping creation."
fi
npm run pages:build && npx wrangler pages deploy --production-branch ${{ github.ref_name }}
npm run pages:build && npx wrangler pages deploy --branch ${{ github.ref_name }}
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
echo "Project exists, skipping creation."
fi
sed -i 's/favicon/favicon-preview/' wrangler.toml
npm run pages:build && npx wrangler pages deploy --production-branch main
npm run pages:build && npx wrangler pages deploy --branch main
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

0 comments on commit 6601d8b

Please sign in to comment.