libctru/.github/workflows/doxygen.yaml

71 lines
1.9 KiB
YAML

name: Build documentation
on:
push:
tags: [ v* ]
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Get current tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
- name: Set up Doxygen
run: sudo apt-get install -y doxygen
- name: Display Doxygen version
run: echo "Doxygen version $(doxygen -v)"
- name: Build documentation
run: |
git clone --branch=master --single-branch --depth 1 https://github.com/devkitPro/3ds-examples examples
cd libctru
CTRU_VERSION=${{ steps.vars.outputs.tag }} doxygen Doxyfile
- name: Publish docs to GH Actions
uses: actions/upload-artifact@v2
with:
path: libctru/docs/*
name: docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: libctru/docs/html
CLEAN: true
SINGLE_COMMIT: true
generatedocset:
name: Generate Docset
runs-on: macos-latest
needs: build
steps:
- name: Pick up artifacts
uses: actions/download-artifact@master
with:
name: docs
path: docs
- name: Set up docsetutil
run: |
git clone https://github.com/SwiftDocOrg/DocSetUtil.git
cd DocSetUtil
make install
- name: Build Docset
run: |
cd docs/html/
make XCODE_INSTALL=../../DocSetUtil/Developer
- name: Publish docs to GH Actions
uses: actions/upload-artifact@v2
with:
path: docs/html/org.devkitPro.libctru.docset/
name: org.devkitpro.libctru.docset