How to set Topology spread constraints
#65
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
pages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm install -g yarn | |
yarn install --frozen-lockfile | |
- name: Ignore OpenAPI | |
run: | | |
./scripts/ignore-openapi | |
- name: Build | |
env: | |
NODE_OPTIONS: "--max_old_space_size=7168" | |
run: | | |
yarn gen-api-docs | |
yarn build | |
- name: Set outputs | |
id: vars | |
run: | | |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
echo "username=$(git log -1 --pretty=format:'%an')" >> $GITHUB_OUTPUT | |
echo "email=$(git log -1 --pretty=format:'%ae')" >> $GITHUB_OUTPUT | |
- name: Deploy to gh-pages branch | |
run: | | |
npm install -g gh-pages | |
GITHUB_REPO_WITH_TOKEN=$(echo ${GITHUB_REPO_LINK} | sed "s/\/\//\/\/git:${GITHUB_TOKEN}@/g") | |
gh-pages -d build \ | |
-o origin \ | |
-m "deploy: ${COMMIT}" \ | |
-u "${AUTHOR_USER} <${AUTHOR_EMAIL}>" \ | |
-r ${GITHUB_REPO_WITH_TOKEN} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AUTHOR_USER: ${{ steps.vars.outputs.username }} | |
AUTHOR_EMAIL: ${{ steps.vars.outputs.email }} | |
COMMIT: ${{ steps.vars.outputs.sha_short }} | |
GITHUB_REPO_LINK: "${{ github.server_url }}/${{ github.repository }}.git" |