feat: remove 工作记录 #75
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 Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: install | |
run: npm install | |
# 生成静态文件 | |
- name: Build | |
run: npm run build | |
# 部署到 GitHub Pages | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.HEXO_DEPLOY_KEY }} # 也就是我们刚才生成的 secret | |
BRANCH: gh-pages # 部署到 gh-pages 分支,因为 master 分支存放的一般是源码,而 gh-pages 分支则用来存放生成的静态文件 | |
FOLDER: docs/.vuepress/dist # vuepress 生成的静态文件存放的地方 | |