From 3a3e1079275d111ed16fd3a6e614d663fc6f77e4 Mon Sep 17 00:00:00 2001 From: Matthias Wittgen Date: Sat, 4 Jun 2022 10:50:03 -0700 Subject: [PATCH] Add reusable workflow for build_docs --- .github/workflows/build_docs.yaml | 48 ++----------------------------- build_docs.ini | 6 ++++ 2 files changed, 9 insertions(+), 45 deletions(-) create mode 100644 build_docs.ini diff --git a/.github/workflows/build_docs.yaml b/.github/workflows/build_docs.yaml index 0d0b666dd1..83223792c3 100644 --- a/.github/workflows/build_docs.yaml +++ b/.github/workflows/build_docs.yaml @@ -1,4 +1,4 @@ -name: docs +name: Build docs on: push: @@ -7,47 +7,5 @@ on: pull_request: jobs: - build_sphinx_docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - # Need to clone everything for the git tags. - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - cache: "pip" - cache-dependency-path: "setup.cfg" - - - name: Install sqlite - run: sudo apt-get install sqlite libyaml-dev - - - name: Update pip/wheel infrastructure - run: | - python -m pip install --upgrade pip - pip install wheel - - - name: Install postgresql (server) - run: | - sudo apt-get update - sudo apt-get install postgresql - - - name: Install postgresql Python packages - run: pip install psycopg2 testing.postgresql - - - name: Install dependencies - run: | - pip install -r requirements.txt - - - name: Build and install - run: pip install -v . - - - name: Install documenteer - run: pip install 'documenteer[pipelines]<0.7' - - - name: Build documentation - working-directory: ./doc - run: package-docs build + call-workflow: + uses: lsst/rubin_workflows/.github/workflows/build_docs.yaml@main diff --git a/build_docs.ini b/build_docs.ini new file mode 100644 index 0000000000..a7de13047a --- /dev/null +++ b/build_docs.ini @@ -0,0 +1,6 @@ +# Ubuntu packages required for build_docs workflow +[ubuntu] +install = postgresql sqlite libyaml-dev +# pip install packages required for build_docs workflow +[pip] +install = psycopg2 testing postgresql