diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 00000000..d2a835f9 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,50 @@ +name: LibJWT Documentation + +on: + push: + tags: + - v* + branches: + - "testing-builds" + paths: + - include/jwt.h + - doxygen/* + +jobs: + build: + if: ${{github.ref == 'refs/heads/master'}} + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: ConorMacBride/install-package@v1 + with: + brew: gnutls openssl@3 jansson pkgconf cmake doxygen graphviz + + - name: Generate documents + run: | + mkdir -p gh-pages + cmake -B build + make -C build doxygen-doc + mv build/doxygen-doc/html gh-pages/HEAD + rm -rf build + git checkout $(git describe --tags --abbrev=0) + cmake -B build + make -C build doxygen-doc + mv build/doxygen-doc/html/* gh-pages/ + + - name: Upload pages + id: deployment + uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action + with: + path: gh-pages/ + + 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@v4