fix: Update Node.js version in GitHub Actions workflow from 16 to 20 … #9
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 Page | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
pages: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout ----------------- | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: recursive | |
# Setup Node ---------------- | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
# Install markmap-cli ---------------- | |
- name: Install markmap-cli | |
run: npm i markmap-cli | |
# Transform Markdown to HTML in Target Folder ---------------- | |
- name: Transform Several Markdown to HTML | |
run: | | |
for file in source/_static/markmap/*.md; do | |
markmap $file -o ${file%.md}.html --no-open | |
done | |
# Sphinxdoc Image ---------------- | |
- name: Use Docker Image | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: hsiangjenli/sphinx-doc:paper-digest-2024-11-19 | |
options: --platform linux/amd64 -v ${{ github.workspace }}:/docs --user root | |
run: | | |
python source/_static/gen_keyword/script.py && make html | |
# Deploy ---------------- | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/html |