Skip to content

Deploy to Developer Portal DEV Bucket #7

Deploy to Developer Portal DEV Bucket

Deploy to Developer Portal DEV Bucket #7

name: Deploy to Developer Portal DEV Bucket
on:
workflow_dispatch:
inputs:
branch:
description: "Which branch to use?"
default: "main"
jobs:
deploy:
name: Deploy docs to Developer Portal Bucket
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Install dependencies
uses: ./.github/actions/yarn-nm-install
- name: Make docs the homepage of this subsite
run: |
rm -f ./docusaurus/website/src/pages/index.tsx
sed -i 's/title: Set up Scenes/title: Set up Scenes\nslug:\ \//g' ./docusaurus/docs/getting-started.md
- name: Build documentation website
env:
GTAG_CONTAINER_ID: ${{ secrets.GTAG_CONTAINER_ID }}
run: |
cd ./docusaurus/website
yarn docs:build -- --config docusaurus.config.devportal.js
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_SA_KEY_DEV }}
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: 'Deploy to Developer Portal Bucket'
run: |
gsutil -m rsync -r -d -c -n ./docusaurus/website/build/ gs://staging-developer-portal/scenes