Skip to content

doc: update doc style (#167) #16

doc: update doc style (#167)

doc: update doc style (#167) #16

Workflow file for this run

name: deploy-docs
on:
push:
tags:
- "v*"
branches:
- "**"
paths:
- ".github/workflows/doc.yml"
- "include/**"
- "Doxyfile"
workflow_dispatch:
jobs:
meta:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: set_tag
run: |
is_release=${{ startsWith(github.ref, 'refs/tags/v') }}
tag=$(git describe --tags --match "v*" ${{ github.ref }} || true)
if [[ $tag != v* ]]; then
tag=$(curl -sX GET "https://api.github.com/repos/MaaXYZ/MaaFramework/releases/latest" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | awk '/tag_name/{print $4}' FS='["]')
if [[ $tag != v* ]]; then
tag="v0.0.0"
fi
tag=$(date "+$tag-%y%m%d-$(git rev-parse --short HEAD)")
fi
if ! $($is_release) ; then
prefix=${tag%-*-*}
suffix=${tag#$prefix-}
tag="$prefix-ci.$suffix"
fi
echo tag=$tag | tee -a $GITHUB_OUTPUT
echo is_release=$is_release | tee -a $GITHUB_OUTPUT
outputs:
tag: ${{ steps.set_tag.outputs.tag }}
is_release: ${{ steps.set_tag.outputs.is_release }}
build:
if: ${{ needs.meta.outputs.is_release == 'true' }}
needs: meta
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.meta.outputs.tag }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build Doxygen
uses: mattnotmitt/[email protected]
with:
doxyfile-path: tools/Doxygen/Doxyfile
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs-gen/html
publish_branch: gh-pages