mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-11 03:13:10 +00:00
feat: github actions deploy to cloudflare pages
This commit is contained in:
1 parent
b88f311af7
commit
3eec35cfbc
1 file changed
+18
-2
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy Hugo site to Pages
|
name: Deploy Hugo site
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
hugo \
|
hugo \
|
||||||
--gc \
|
--gc \
|
||||||
--minify \
|
--minify \
|
||||||
--baseURL "${{ steps.pages.outputs.base_url }}/" \
|
--baseURL "https://miti99.com/" \
|
||||||
--cacheDir "${{ runner.temp }}/hugo_cache"
|
--cacheDir "${{ runner.temp }}/hugo_cache"
|
||||||
- name: Cache Save
|
- name: Cache Save
|
||||||
id: cache-save
|
id: cache-save
|
||||||
@@ -80,3 +80,19 @@ jobs:
|
|||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
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