Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Update CI + CD pipeline to deploy Sphinx docs to GH pages (#461)
Dhruv Bhanushali3a8d9eb0ebe9
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex ae0e7835a..964277c26 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -135,6 +135,14 @@ jobs:- name: Run analytics testsrun: just nl-test -T+ - name: Make developer docs+ run: just sphinx-make -T+ - name: Upload developer docs+ uses: actions/upload-artifact@v2+ with:+ name: docs+ path: api/build/html/+push:name: Publish Docker imagesruns-on: ubuntu-latest@@ -175,3 +183,23 @@ jobs:docker tag ${{ matrix.image }} \ghcr.io/wordpress/openverse-${{ matrix.image }}:${{ github.ref_name }}docker push --all-tags ghcr.io/wordpress/openverse-${{ matrix.image }}++ docs:+ name: Publish developer docs+ runs-on: ubuntu-latest+ if: github.event_name == 'push' && github.repository == 'WordPress/openverse-api'+ needs:+ - test-api+ steps:+ - name: Download developer docs+ uses: actions/download-artifact@v2+ with:+ name: docs+ path: /tmp/docs++ - name: Deploy+ uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3+ with:+ github_token: ${{ secrets.GITHUB_TOKEN }}+ publish_dir: /tmp/docs+ force_orphan: truediff --git a/justfile b/justfileindex e28fd1008..df49d2ab0 100644--- a/justfile+++ b/justfile@@ -198,8 +198,8 @@ nl-test args="":########### Compile Sphinx documentation into HTML output-sphinx-make service="web": up wait-for-es wait-for-ing wait-for-web- docker-compose exec {{ service }} sphinx-build -M html docs/ build/+sphinx-make args="" service="web": up wait-for-es wait-for-ing wait-for-web+ docker-compose exec {{ args }} {{ service }} sphinx-build -M html docs/ build/# Serve Sphinx documentation via a live-reload serversphinx-live service="web" port="3000": up wait-for-es wait-for-ing wait-for-web