Update tag-plugins.md #154
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: auto deploy # workflow name | |
on: | |
[push] # 触发事件 | |
jobs: | |
build: # job1 id | |
runs-on: ubuntu-latest # 运行环境为最新版 Ubuntu | |
name: A job to deploy blog. | |
steps: | |
- name: Checkout # step1 获取源码 | |
uses: actions/[email protected] # 使用 actions/[email protected] | |
with: # 条件 | |
submodules: true # Checkout private submodules(themes or something else). 当有子模块时切换分支? | |
- name: Setup Node.js 16.x | |
uses: actions/setup-node@master | |
with: | |
node-version: "16.x" | |
- name: Generate Public Files | |
run: | | |
# Restore last modified time | |
git ls-files -z | while read -d '' path; do touch -d "$(git log -1 --format="@%ct" "$path")" "$path"; done | |
npm i | |
npm install hexo-cli -g | |
npm run start | |
- name: Deploy Github | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
commit_message: ${{ github.event.head_commit.message }} | |
force_orphan: true |