fix: 分支切换 #8
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: Pages | |
on: | |
push: | |
branches: [ blogs ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 14.x ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: git submodule init | |
- run: git submodule update | |
- run: rm -fr public/ | |
- run: | | |
git fetch origin pages | |
git worktree add -B pages public origin/pages | |
- run: npx hexo generate | |
- run: | | |
cd public | |
git config --global user.name 'ruY9527' | |
git config --global user.email '[email protected]' | |
git add . | |
git commit -m "Update pages" | |
git push |