Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy rosdep documentation via GitHub Pages. #980

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 19 additions & 0 deletions .earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://docs.docker.com/build/concepts/context/#dockerignore-files
# Unlike .gitignore files directories are not ignored at all layers by default.
# The **/ prefix will make a pattern behave like a .gitignore pattern and apply
# in any directory, including the root.
**/*.pyc
**/.direnv/
**/.envrc
**/.git/
**/.github/
**/.pytest_cache/
**/.ruff_cache/
**/__pycache__/
**/_build/
**/build/
**/deb_dist/
**/dist/
**/rosdep.egg-info/
**/rosdep_modules.egg-info/
**/target/
33 changes: 33 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Doc build
on:

Check warning on line 3 in .github/workflows/doc.yaml

View workflow job for this annotation

GitHub Actions / yamllint

3:1 [truthy] truthy value should be one of [false, true]
push:
branches: ['main', 'docdeps']

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
- name: Build documentation
run: |
earthly --ci --output +doc
- name: Upload build for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: doc/_build/html
deploy:
permissions:
contents: read
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
35 changes: 35 additions & 0 deletions build.earth
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
VERSION 0.8

build:
FROM docker.io/library/python:3.12
RUN mkdir -p /src || true
COPY --dir doc src test \
CHANGELOG.rst \
Makefile \
README.md \
rosdoc.yaml \
setup.cfg \
setup.py \
stdeb.cfg \
/src/rosdep
WORKDIR /src/rosdep
RUN pip install -e .

testdeps:
FROM +build
RUN pip install .[test]

test:
# TODO tests aren't passing in context.
FROM +testdeps
RUN pytest test

docdeps:
FROM +build
RUN pip install .[doc]

doc:
FROM +docdeps
WORKDIR /src/rosdep/doc
RUN make html
SAVE ARTIFACT _build/html AS LOCAL doc/_build/html
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,4 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
# intersphinx_mapping = {'http://docs.python.org/': None}
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
'flake8-quotes',
'pytest',
],
'doc': [
'catkin_sphinx',
'sphinx'
],
},
'author': 'Tully Foote, Ken Conley',
'author_email': '[email protected]',
Expand Down
Loading