Skip to content

Commit

Permalink
use cloudflare pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kw-lee committed Dec 25, 2023
1 parent 209031e commit 13c5f5c
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/deply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,19 @@ jobs:
- run: npm i
- run: npm run build
- name: Deploy to GitHub Pages
if: success() && github.ref == 'refs/heads/main'
uses: crazy-max/ghaction-github-pages@v4
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
target_branch: gh-pages
build_dir: public
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: snubayes
directory: public
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: main
# Optional: Change the working directory
workingDirectory: my-site
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: '3'

0 comments on commit 13c5f5c

Please sign in to comment.