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

Commit abd9d5c

Browse files
committed
actions: deploy to github pages
1 parent 0b3e742 commit abd9d5c

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
schedule:
7+
- cron: '0 2 * * *'
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout source code
16+
uses: actions/checkout@v6
17+
with:
18+
submodules: true
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v6
22+
with:
23+
node-version: '24'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: |
28+
npm install -g hexo-cli
29+
npm install
30+
31+
- name: Generate static files
32+
run: |
33+
hexo generate
34+
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./public
40+
publish_branch: gh-pages
41+
force_orphan: true

0 commit comments

Comments
 (0)