From 9deab34066f66aa2d159d08cae21d7926391ada3 Mon Sep 17 00:00:00 2001 From: august-alt <77973983+august-alt@users.noreply.github.com> Date: Tue, 27 Jul 2021 16:46:55 +0400 Subject: [PATCH] docs, build: add documentation workflow --- .github/workflows/publish-api-docs.yml | 42 ++++++++++++++++++++++++++ Doxyfile | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-api-docs.yml diff --git a/.github/workflows/publish-api-docs.yml b/.github/workflows/publish-api-docs.yml new file mode 100644 index 0000000..43ea0f4 --- /dev/null +++ b/.github/workflows/publish-api-docs.yml @@ -0,0 +1,42 @@ +name: publish-api-doc + +on: + push: + branches: + - master + +jobs: + api-doc: + runs-on: ubuntu-latest + + steps: + - name: Git Checkout + uses: actions/checkout@v2 + + - name: Create clean documentation branch + run: git checkout -b documentation + + - name: Install doxygen + run: sudo apt-get install doxygen + + - name: Generate autodocs for gpui editor + run: doxygen + + - name: Add generated autodocs to Git repo in the documentation branch + run: | + git config --global user.email "gpui-github-bot@basealt.ru" + git config --global user.name "$GITHUB_WORKFLOW GitHub action" + git add -f docs + git commit -am "docs: add auto-generated developer documentation" + + - name: Publish autodocs as GitHub pages + run: git push -f origin documentation:documentation + + - name: Result URLs + run: | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1) + REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2) + echo "Documentation on a github.io: https://$REPO_OWNER.github.io/$REPO_NAME/docs" + echo "" + echo "Documentation branch: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/documentation" + diff --git a/Doxyfile b/Doxyfile index 7ed5be2..683680a 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1135,7 +1135,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = html +HTML_OUTPUT = ./ # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp).