Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Automatic docs build #45

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Check for uncommitted docs in the CI
Add a gh action step that checks for uncommitted docs
and fails the CI.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
  • Loading branch information
sechkova committed Mar 25, 2022
commit 5e8fae03e3709f111e7132579ddcf925450c7fde
30 changes: 18 additions & 12 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: docs-build
on :
push:
branches:
- main
pull_request:
paths:
- "mcat/*.py"

jobs:
docs-build:
name: Automatic docs build
name: Docs build
runs-on: ubuntu-latest
env:
# see tox.ini
@@ -31,12 +29,20 @@ jobs:
- name: Run tox (${{ env.TOXENV }})
run: tox

- name: Commit docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get git status
id: git_status
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@users.noreply.github.com'
git add -A
git commit -s -m "Build docs"
git push
if [ $(git status --porcelain) == "" ]; then
echo ::set-output name=uncommitted::false
else
echo ::set-output name=uncommitted::true
fi

- name: Check for uncommited docs
if: ${{steps.git_status.outputs.uncommitted}}
run: |
echo "Uncommitted docs found. Faliing the job."
exit 1