Skip to content

Update

Update #188

name: Hexo Build & Deploy
on:
push:
branches:
- hexo
jobs:
Build_And_Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.HEXO_BUILD_GET_PERSONAL_REPO }}
submodules: 'true'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.15.1"
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: |
${{ runner.OS }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: main