Skip to content

Commit

Permalink
docs: move to gh pages (commaai#30242)
Browse files Browse the repository at this point in the history
* mv to pages

* cleanup

* push static

* mv that

* new name for the orphan

* only master

* build op
  • Loading branch information
adeebshihadeh authored Oct 15, 2023
1 parent f0aa631 commit f8a7def
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 78 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: docs

on:
push:
branches:
- master
pull_request:

concurrency:
group: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true

env:
BASE_IMAGE: openpilot-base

BUILD: selfdrive/test/docker_build.sh base

RUN: docker run --shm-size 1G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/sh -c

jobs:
docs:
name: build docs
runs-on: ubuntu-20.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: |
${{ env.RUN }} "scons -j$(nproc)"
- name: Build docs
run: |
${{ env.RUN }} "apt update && apt install -y doxygen && cd docs && make html"
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
with:
path: openpilot-docs
ssh-key: ${{ secrets.OPENPILOT_DOCS_KEY }}
repository: commaai/openpilot-docs
- name: Push
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
run: |
set -x
source release/identity.sh
cd openpilot-docs
git checkout --orphan tmp
git rm -rf --cached .
cp -r ../build/docs/html/ docs/
touch docs/.nojekyll
git add -f .
git commit -m "build docs"
# docs live in different repo to not bloat openpilot's full clone size
git push -f origin gh-pages
18 changes: 0 additions & 18 deletions .github/workflows/tools_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,6 @@ jobs:
run: |
selfdrive/test/docker_build.sh sim
docs:
name: build docs
runs-on: ubuntu-20.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Setup to push to repo
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
run: |
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
$DOCKER_LOGIN
- name: Build and push docs image
run: |
selfdrive/test/docker_build.sh docs
devcontainer:
name: devcontainer
runs-on: ubuntu-latest
Expand Down
42 changes: 0 additions & 42 deletions docs/docker/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions docs/docker/nginx.conf

This file was deleted.

3 changes: 0 additions & 3 deletions selfdrive/test/docker_common.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
if [ $1 = "base" ]; then
export DOCKER_IMAGE=openpilot-base
export DOCKER_FILE=Dockerfile.openpilot_base
elif [ $1 = "docs" ]; then
export DOCKER_IMAGE=openpilot-docs
export DOCKER_FILE=docs/docker/Dockerfile
elif [ $1 = "sim" ]; then
export DOCKER_IMAGE=openpilot-sim
export DOCKER_FILE=tools/sim/Dockerfile.sim
Expand Down

0 comments on commit f8a7def

Please sign in to comment.