From 6050089529a215e89d7f90c7f2113eabaaf32652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=B3=E5=85=B0=E9=9F=B3=E9=9F=B5?= Date: Thu, 12 Oct 2023 23:00:19 +0800 Subject: [PATCH] Workflow --- .github/workflows/hugo-GitHub_Action.yml | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/hugo-GitHub_Action.yml diff --git a/.github/workflows/hugo-GitHub_Action.yml b/.github/workflows/hugo-GitHub_Action.yml new file mode 100644 index 0000000..ce73882 --- /dev/null +++ b/.github/workflows/hugo-GitHub_Action.yml @@ -0,0 +1,31 @@ +name: Hugo Build + +on: + push: + branches: + - main # Set a branch to deploy + +jobs: + deploy: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + 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: 'latest' + # extended: true + + - name: Build + run: hugo + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.personal_token }} + PUBLISH_BRANCH: CF-PAGES + publish_dir: ./public