添加了澳大利亚相关内容 (#1232) #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 部署到 Cloudflare | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- '.github/workflows/deploy.yaml' | |
- 'content/**' | |
- 'config/**' | |
- 'static/**' | |
- 'themes/**' | |
- 'package.json' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 检出代码 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
cache: 'npm' | |
- name: Install npm dependencies | |
run: npm install | |
- name: Set up Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: latest | |
extended: true | |
- name: Build site | |
run: hugo --minify --enableGitInfo --baseURL "/" | |
- name: Deploy to Cloudflare Pages | |
id: deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }} | |
command: pages deploy public --project-name=mtfwiki | |