new: 新增vscode tips文章 #107
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: Build and Publish Blog | |
on: | |
push: | |
branches: | |
- blog | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Disable quotePath | |
run: git config --global core.quotePath false | |
- name: setup hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: build hugo | |
run: hugo --gc --minify --cleanDestinationDir | |
- name: create search index | |
run: tar -xf pagefind_extended.tar.gz && chmod u+x pagefind_extended && ./pagefind_extended && rm -f pagefind_extended | |
- name: deploy hugo | |
uses: peaceiris/actions-gh-pages@v2 | |
env: | |
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
PUBLISH_BRANCH: master | |
PUBLISH_DIR: ./public |