support unknown post deployment properties (#3675) #1973
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: Publish Website | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-documentation-website: | |
name: Build Documentation Site | |
runs-on: ubuntu-latest | |
if: github.repository == 'finos/legend-studio' # prevent running this action in forks | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Get Yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Setup Yarn cache | |
uses: actions/[email protected] | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn- | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: 21 | |
- name: Install dependencies | |
run: yarn | |
- name: Build website content | |
env: | |
# Typedoc build could consume a large amount of memory | |
# See https://github.com/TypeStrong/typedoc/issues/1606 | |
NODE_OPTIONS: '--max-old-space-size=4096' | |
run: yarn build:ts && yarn build:website | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
path: ./build/docs | |
deploy-documentation-website: | |
name: Deploy Documentation Site | |
runs-on: ubuntu-latest | |
if: github.repository == 'finos/legend-studio' # prevent running this action in forks | |
needs: build-documentation-website | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/[email protected] |