Skip to content

Commit

Permalink
ci(docs): Fix paths and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Oct 23, 2024
1 parent 4802cf3 commit dbd12e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Build Documentation
on:
push:
branches:
- master
- main
paths:
- .github/workflows/build-docs.yaml
- docs/**
permissions:
contents: write
jobs:
Expand All @@ -22,8 +24,8 @@ jobs:
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -r requirements.txt
- run: mkdocs gh-deploy --force
- run: pip install -r docs/requirements.txt
- run: cd docs && mkdocs gh-deploy --force
# Ref: https://github.com/ojacques/mkdocs-git-committers-plugin-2
# Ref: https://github.com/ojacques/mkdocs-git-committers-plugin-2/issues/51#issuecomment-1951450239
env:
Expand Down
3 changes: 3 additions & 0 deletions tests/lint_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
if content.count("@master") != content.count("master"):
# Ref: https://github.com/j3soon/ros2-essentials/pull/44#pullrequestreview-2251404984
raise ValueError(f"`master` should not exist since it's obsolete: '{filename}'")
for filename in glob.glob(f"{repo_dir}/.github/workflows/*.yml"):
logging.debug(f"Checking: '{filename[len(repo_dir)+1:]}'...")
raise ValueError(f"workflows should use `.yaml` files instead of `.yml` files: '{filename}'")

0 comments on commit dbd12e4

Please sign in to comment.