Update deploy_hexo.yml #7
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: 'Deploy hexo' | |
on: | |
push: | |
branches: [master] | |
jobs: | |
hexo-deployment: | |
runs-on: ubuntu-latest | |
env: | |
TZ: Asia/Shanghai | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup nodejs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: | | |
node -v | |
npm i -g hexo-cli | |
npm i | |
- name: Generate static files | |
run: | | |
hexo clean | |
hexo g | |
- name: Deploy to gh-pages branch | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages | |
FOLDER: public | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |