mirror of
https://github.com/tiennm99/miti99.git
synced 2026-10-03 07:13:19 +00:00
feat: github actions deploy to cloudflare pages
This commit is contained in:
1 parent
cb72f59a6f
commit
7b5328bc6f
1 file changed
+18
-2
@@ -1,4 +1,4 @@
|
||||
name: Deploy Hugo site to Pages
|
||||
name: Deploy Hugo site
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
hugo \
|
||||
--gc \
|
||||
--minify \
|
||||
--baseURL "${{ steps.pages.outputs.base_url }}/" \
|
||||
--baseURL "https://miti99.com/" \
|
||||
--cacheDir "${{ runner.temp }}/hugo_cache"
|
||||
- name: Cache Save
|
||||
id: cache-save
|
||||
@@ -80,3 +80,19 @@ jobs:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
deploy-cloudflare-pages:
|
||||
runs-on: ubuntu-latest
|
||||
name: Deploy on CloudFlare Pages
|
||||
needs: build
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
steps:
|
||||
- name: Deploy
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy public --project-name=miti99
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in new issue
Block a user