Skip to content

Set VERSION and CLONE_DIR in the workflow #27

Set VERSION and CLONE_DIR in the workflow

Set VERSION and CLONE_DIR in the workflow #27

Workflow file for this run

name: Publish SDK Reference Docs
on:
push:
jobs:
PublishDocs:
name: Publish SDK Reference Docs
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.PLATFORM_SA_GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout Docs Repo
uses: actions/checkout@v3
with:
repository: immutable/imx-docs
token: ${{ secrets.PLATFORM_SA_GITHUB_TOKEN }}
path: imx-docs
ref: main
- name: Setup environment variables
run: |
echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
echo "CLONE_DIR=./imx-docs" >> $GITHUB_ENV
- name: Pending release check
run: ./.github/scripts/check-pending-release.sh
shell: bash
- name: Setup Github
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: export NODE_OPTIONS=--max-old-space-size=6144 && yarn build
- name: Build SDK Docs
run: yarn docs:build
- name: Create SDK Docs PR
run: ./.github/scripts/push-docs-pr.sh
shell: bash