2024-03-14 09:09:45 +00:00
|
|
|
name: github pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-03-14 09:10:14 +00:00
|
|
|
- master # Set a branch name to trigger deployment
|
2024-03-14 09:09:45 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
|
|
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: "0.123.8"
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: hugo --minify
|
|
|
|
- name: Publish to Cloudflare Pages
|
|
|
|
uses: cloudflare/pages-action@v1
|
|
|
|
with:
|
|
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
|
|
accountId: 76906b4e38909e314e89939ec9f8e485
|
|
|
|
projectName: blog-usbharu
|
|
|
|
directory: public
|
|
|
|
# Optional: Enable this if you want to have GitHub Deployments triggered
|
|
|
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|