Deploy to Developer Portal DEV Bucket #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable --prefer-offline | |
#mac: sed -i '' 's/title: Data Plane Contract - Technical Specification/title: Data Plane Contract - Technical Specification\nslug:\ \//g' ./docs/contract/contract.md | |
#linux: sed -i 's/title: Data Plane Contract - Technical Specification/title: Data Plane Contract - Technical Specification\nslug:\ \//g' ./docs/contract/contract.md | |
- name: Make docs the homepage of this subsite | |
run: | | |
rm -f ./docusaurus/website/src/pages/index.tsx | |
sed -i 's/title: Data Plane Contract - Technical Specification/title: Data Plane Contract - Technical Specification\nslug:\ \//g' ./docs/contract/contract.md | |
- name: Build documentation website | |
run: yarn docs:build:devportal | |
- id: 'auth' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: ${{ secrets.GCP_SA_KEY_DEV }} | |
- name: Deploy to Developer Portal Bucket | |
uses: google-github-actions/upload-cloud-storage@v1 | |
with: | |
path: './docusaurus/website/build/' | |
destination: 'staging-developer-portal/dataplane' | |
parent: false |