Add workflow for generating website from readme

This commit is contained in:
KnugiHK
2025-04-27 13:00:51 +08:00
parent 82ac466527
commit 578c961932
2 changed files with 512 additions and 0 deletions

35
.github/workflows/generate-website.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Generate Website from README
on:
push:
paths:
- 'README.md'
- '.github/workflows/generate-website.yml'
- '.github/generate-website.js'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm install marked fs-extra marked-alert
- name: Generate website from README
run: node .github/generate-website.js
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs
clean: true