From: Jane Sandberg Date: Wed, 27 Oct 2021 17:16:30 +0000 (-0700) Subject: LP1903476: Use Github Actions to build antora documentation X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c9c1041c4d20dc8319c92ba461ac43543513e073;p=evergreen%2Ftadl.git LP1903476: Use Github Actions to build antora documentation This allows documenters to submit a pull request and get a preview version where they can view their changes. The goal is to provide quick feedback to documenters on whether their changes build correctly and appear as desired, without them having to have a full docs building setup locally. To test: 1. Use the Github Web site to fork the Evergreen repository. 2. Take the .github/workflows/docs.yml file from this commit. Add it to any branch of your fork of the Evergreen repository. 3. Click on the Actions tab of your fork in the Github Web site. 4. Click on the most recent run (at the top of the list). 5. When the build process is done (should take 3-4 minutes), download and unzip the artifact that appears at the bottom of the screen. Open index.html in your browser. Confirm that the docs built properly. 6. On the same branch, make some changes to the documentation in the docs/modules directory. 7. Repeat steps 3-5. Confirm that your changes are reflected in the new artifact. Signed-off-by: Jane Sandberg Signed-off-by: Jason Boyer --- diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..0d41f03b6e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,18 @@ +name: docs +on: [push, pull_request] +jobs: + Build-And-Publish-Docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: '5.34' + - run: | + cd docs + sed -i 's/branches.*/branches: [HEAD]/' site.yml + perl generate_docs.pl --base-url http://example.com + - uses: actions/upload-artifact@v2 + with: + name: built-docs + path: docs/output