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 <sandbej@linnbenton.edu>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
--- /dev/null
+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