diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad19726cc..afcf0b745 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: uses: pre-commit/action@v3.0.0 documentation: - name: "Build Documentation" + name: "Build & Deploy Documentation" runs-on: ubuntu-22.04 needs: - pre-commit @@ -77,6 +77,12 @@ jobs: name: Make documentation run: | pipenv --python ${{ steps.setup-python.outputs.python-version }} run mkdocs build --config-file ./mkdocs.yml + - + name: Deploy documentation + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + run: | + echo "docs.paperless-ngx.com" > "${{ github.workspace }}/docs/CNAME" + pipenv --python ${{ steps.setup-python.outputs.python-version }} run mkdocs gh-deploy --force --no-history - name: Upload artifact uses: actions/upload-artifact@v3 @@ -85,26 +91,6 @@ jobs: path: site/ retention-days: 7 - documentation-deploy: - name: "Deploy Documentation" - runs-on: ubuntu-22.04 - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: - - documentation - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Deploy docs - uses: mhausenblas/mkdocs-deploy-gh-pages@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CUSTOM_DOMAIN: docs.paperless-ngx.com - CONFIG_FILE: mkdocs.yml - EXTRA_PACKAGES: build-base - REQUIREMENTS: docs/requirements.txt - tests-backend: name: "Backend Tests (Python ${{ matrix.python-version }})" runs-on: ubuntu-22.04 @@ -121,8 +107,8 @@ jobs: - name: Start containers run: | - docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml pull --quiet - docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml up --detach + docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml pull --quiet + docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml up --detach - name: Set up Python id: setup-python @@ -177,8 +163,8 @@ jobs: name: Stop containers if: always() run: | - docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml logs - docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml down + docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml logs + docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml down install-frontend-depedendencies: name: "Install Frontend Dependendencies" @@ -438,6 +424,7 @@ jobs: name: "Build Release" needs: - build-docker-image + - documentation runs-on: ubuntu-22.04 steps: - diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index f687a4e70..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ --i https://pypi.python.org/simple -mkdocs-glightbox==0.3.4; python_version >= '3.8'