Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Deploy to GitHub Pages #2

Deploy to GitHub Pages

Deploy to GitHub Pages #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: ["master"]
schedule:
- cron: '0 2 * * *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v6
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: |
npm install -g hexo-cli
npm install
- name: Generate static files
run: |
hexo generate
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages
force_orphan: true