Skip to content

chore: 更换域名

chore: 更换域名 #8

Workflow file for this run

name: main
on:
push: #push即触发
branches:
- main
paths-ignore:
- 'docs/**'
- 'bin'
- 'README.md'
- '.env'
- '.gitignore'
- '.editorconfig'
- '.gitattributes'
- '.gitmodules'
jobs:
hugo-Deploy:
runs-on: ubuntu-latest #虚拟环境(github提供)
steps:
- uses: actions/checkout@v3 #官方Action, pull当前git项目
with:
persist-credentials: false #不保存证书(当前Action的参数)
submodules: recursive #true OR recursive
fetch-depth: 0
- name: Read .env
id: hugo-version
run: | #读取Hugo版本
. ./.env
echo "HUGO_VERSION=${HUGO_VERSION}" >>$GITHUB_OUTPUT
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '${{ steps.hugo-version.outputs.HUGO_VERSION }}'
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }} #github会自动生成含有秘钥的环境变量
publish_dir: ./public
publish_branch: gh-pages