From 2cae68b66bb1972236c03e3a4e7612c19260cdd4 Mon Sep 17 00:00:00 2001 From: ali-encord <112628737+ali-encord@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:06:53 +0000 Subject: [PATCH] Ar/adding docs pipeline (#14) * adding docs deployment pipeline * adding docs deployment pipeline --- .github/workflows/update-docs.yml | 37 +++++++++++++++++++++++++++++++ .gitignore | 5 ++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-docs.yml diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 0000000..0e28d0c --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,37 @@ +name: Encord Agents Update Docs + +on: + push: + branches: + - master + workflow_dispatch: + +env: + HOSTING: prod + GCP_PROJECT: cord-docs + +concurrency: + group: agent-docs-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-checks: + name: Build and Publish Docs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup root poetry environment + uses: ./.github/actions/setup-root-poetry-environment + + - name: Build Docs + run: | + poetry run mkdocs build + + - name: Deploy Docs + run: | + npm install -g firebase-tools + echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > /tmp/gcp_key.json + export GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcp_key.json + firebase deploy -P default --only hosting:${{ env.HOSTING }} diff --git a/.gitignore b/.gitignore index 89b95ae..dde2d8d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,8 @@ dist/ .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -229,3 +230,5 @@ tags # End of https://www.toptal.com/developers/gitignore/api/vim,python,macos +# Firebase temp files +.firebase/