Files
godot-docs/.github/workflows/ci.yml
T
Hugo Locurcio 798c5d51f6 GitHub Actions: Upload ZIPs of compiled HTML documentation for reading
This can be used to read the documentation without an Internet
connection.
2021-01-13 02:17:04 +01:00

48 lines
1.5 KiB
YAML

name: Continuous integration
on:
push:
pull_request:
schedule:
# Every week on Monday at midnight (UTC).
# This keeps the generated HTML documentation fresh.
- cron: '0 0 * * 1'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
# Install tools used by `_tools/format.sh`.
sudo apt-get -qq update
sudo apt-get -qq install dos2unix recode
sudo pip3 install -r requirements.txt
sudo pip3 install codespell
- name: Linter checks
if: github.event_name != 'schedule'
run: |
bash _tools/format.sh
codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt {about,community,development,getting_started,tutorials}/**/*.rst
- name: Sphinx build
run: |
if [[ "$GITHUB_EVENT_NAME" == "schedule" ]]; then
# Build HTML to upload it.
sphinx-build --color -d _build/doctrees -W . _build/html
else
# Use dummy builder to improve performance.
sphinx-build --color -b dummy -d _build/doctrees -W . _build/html
fi
- uses: actions/upload-artifact@v2
if: github.event_name == 'schedule'
with:
name: godot-docs-html
path: _build/html
# Keep the current build and the previous build (in case a scheduled build failed).
retention-days: 15