feat:增加文章 #17
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: hexo | |
on: | |
push: | |
branches: | |
- indigo | |
env: | |
GH_REF: github.com/lanpangzhi/lanpangzhi.github.io | |
secretId: ${{ secrets.SECRETID }} | |
secretKey: ${{ secrets.SECRETKEY }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "10.14.0" | |
- name: Install and Deploy | |
run: | | |
npm install hexo-cli -g | |
npm install | |
hexo generate | |
hexo d | |
- name: Deploy github | |
run: | | |
cd ./public | |
git init | |
git config user.name "lanpangzhi" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "GitHub Actions 自动部署" | |
git push --force --quiet "https://${{secrets.CI_TOKEN}}@${{env.GH_REF}}" master:master |