Merge pull request #6 from MtFmT-Lib/dev_www_inact #6
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: Document | |
on: | |
push: | |
paths: | |
- "**.c" | |
- "**.h" | |
- "**.md" | |
- ".github/**.yml" | |
- "assets/**.scss" | |
pull_request: | |
branches: [main] | |
paths: | |
- "**.c" | |
- "**.h" | |
- "**.md" | |
- ".github/**.yml" | |
- "assets/**.scss" | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: true | |
default: "warning" | |
# 保证权限合适 | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# 避免跳过部署 | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build github pages | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Doxygen 样式 | |
- name: Doxygen scss compile | |
uses: gha-utilities/sass-build@v0.5.1 | |
with: | |
source: "./assets/doxygen/css/style.scss" | |
destination: "./assets/doxygen/html/style.css" | |
includePaths: "./assets/doxygen/css/:./assets/common/" | |
outputStyle: compressed | |
# Doxygen | |
- name: Doxygen | |
uses: mattnotmitt/doxygen-action@v1.9.5 | |
with: | |
working-directory: "./" | |
doxyfile-path: "Doxyfile" | |
# Github page | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: "./" | |
destination: "./_site" | |
# 打包 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
# 进行部署 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |