diff --git a/.github/workflows/_clean_deployment.yml b/.github/workflows/_clean_deployment.yml index fff15403..15895829 100644 --- a/.github/workflows/_clean_deployment.yml +++ b/.github/workflows/_clean_deployment.yml @@ -1,5 +1,5 @@ --- -name: Clean Docs Deployment +name: Composite Clean Docs Deployment on: workflow_call: @@ -14,7 +14,7 @@ on: required: true GOOGLE_WORKLOAD_IDP_SECRET_NAME: required: true - GCP_DOCS_LOCATION: + GCP_PREVIEW_DOCS_LOCATION: required: true jobs: @@ -40,4 +40,4 @@ jobs: - name: Clean up deployment run: | - gsutil rm -r gs://${{ secrets.GCP_DOCS_LOCATION }}/${{ inputs.path }} + gsutil rm -r gs://${{ secrets.GCP_PREVIEW_DOCS_LOCATION }}/${{ inputs.path }} diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 9877191f..8ea803b0 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -1,5 +1,5 @@ --- -name: Publish Voxel51 Docs +name: Composite Publish Voxel51 Docs on: workflow_call: @@ -7,6 +7,9 @@ on: src-dir: type: string required: true + secret-key: + type: string + required: true dest-dir: type: string required: false @@ -19,6 +22,8 @@ on: required: true GCP_DOCS_LOCATION: required: true + GCP_PREVIEW_DOCS_LOCATION: + required: true jobs: publish-docs: @@ -64,5 +69,5 @@ jobs: uses: google-github-actions/upload-cloud-storage@v2 with: path: ${{ inputs.src-dir }} - destination: ${{ secrets.GCP_DOCS_LOCATION }}/${{ inputs.dest-dir }} + destination: ${{ secrets[inputs.secret-key] }}/${{ inputs.dest-dir }} parent: false diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 485ff68f..b25e73fd 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -11,7 +11,7 @@ on: concurrency: preview-${{ github.ref }} env: - PREVIEW_BASE_URL: https://beta-docs.voxel51.com/previews + PREVIEW_BASE_URL: https://preview-docs.voxel51.com jobs: deploy-preview: @@ -22,6 +22,7 @@ jobs: with: src-dir: site/ dest-dir: pr-${{ inputs.pr-number }} + secret-key: GCP_PREVIEW_DOCS_LOCATION secrets: inherit leave-pr-comment: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2a6200ad..a7a58ef0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,4 +20,5 @@ jobs: uses: ./.github/workflows/_publish.yml with: src-dir: site/ + secret-key: GCP_DOCS_LOCATION secrets: inherit