From 953818f1d303bf83929c23b2e74214ca60f2300c Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Thu, 7 Sep 2023 11:01:12 +0100 Subject: [PATCH] ci: update docs build to use root and gosu --- .github/workflows/docs.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d0cddf893d..7de667c6f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -41,7 +41,9 @@ jobs: build_openapi_json: name: Build OpenAPI runs-on: ubuntu-latest - container: ghcr.io/hotosm/fmtm/backend:ci-main + container: + image: ghcr.io/hotosm/fmtm/backend:ci-main + options: --user root steps: - name: Checkout repository @@ -60,13 +62,14 @@ jobs: - name: Build OpenAPi JSON run: | - cd src/backend - python ../../scripts/gen_openapi_json.py -o ../../docs/openapi.json + gosu appuser python scripts/gen_openapi_json.py -o docs/openapi.json publish_docs: name: Publish Docs runs-on: ubuntu-latest - container: ghcr.io/hotosm/fmtm/backend:ci-main + container: + image: ghcr.io/hotosm/fmtm/backend:ci-main + options: --user root needs: [build_doxygen, build_openapi_json] steps: @@ -86,5 +89,4 @@ jobs: - name: Publish run: | - cd src/backend - mkdocs gh-deploy --config-file=../../mkdocs.yml --force + gosu appuser mkdocs gh-deploy --force