Skip to content

Deploy to Developer Portal DEV Bucket #5

Deploy to Developer Portal DEV Bucket

Deploy to Developer Portal DEV Bucket #5

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 '' '1s/^/---\nslug: \/\n---\n/' ./docs/contract/contract.md
#linux: sed -i '1s/^/---\nslug: \/\n---\n/' ./docs/contract/contract.md
- name: Make docs the homepage of this subsite
run: |
rm -f ./docusaurus/website/src/pages/index.tsx
sed -i '1s/^/---\nslug: \/\n---\n/' ./docs/contract/contract.md
- name: Build documentation website
run: yarn docs:build:devportal:dev
- 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