Skip to content

build(actions): Use separate preview domain #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/_clean_deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Clean Docs Deployment
name: Composite Clean Docs Deployment

on:
workflow_call:
Expand All @@ -14,7 +14,7 @@ on:
required: true
GOOGLE_WORKLOAD_IDP_SECRET_NAME:
required: true
GCP_DOCS_LOCATION:
GCP_PREVIEW_DOCS_LOCATION:
required: true

jobs:
Expand All @@ -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 }}
9 changes: 7 additions & 2 deletions .github/workflows/_publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
name: Publish Voxel51 Docs
name: Composite Publish Voxel51 Docs

on:
workflow_call:
inputs:
src-dir:
type: string
required: true
secret-key:
type: string
required: true
dest-dir:
type: string
required: false
Expand All @@ -19,6 +22,8 @@ on:
required: true
GCP_DOCS_LOCATION:
required: true
GCP_PREVIEW_DOCS_LOCATION:
required: true

jobs:
publish-docs:
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ jobs:
uses: ./.github/workflows/_publish.yml
with:
src-dir: site/
secret-key: GCP_DOCS_LOCATION
secrets: inherit
Loading