[PLAT-4141] Expose scene annotations API (#147) #124
This file contains hidden or 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 | |
on: { push: { branches: [master] } } | |
jobs: | |
detect-publish: | |
runs-on: ubuntu-latest | |
outputs: | |
publish: ${{ steps.detect-publish.outputs.publish }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: detect-publish | |
run: | | |
result=$(./scripts/detect_publish.sh) | |
echo $result | |
echo ::set-output name=publish::$result | |
publish: | |
runs-on: ubuntu-latest | |
needs: [detect-publish] | |
if: needs.detect-publish.outputs.publish == 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org | |
scope: '@vertexvis' | |
- name: Publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY: ${{ github.repository }} | |
run: | | |
yarn install --frozen-lockfile | |
yarn verify | |
./scripts/publish.sh | |
docs: | |
runs-on: ubuntu-latest | |
needs: [publish] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org | |
scope: '@vertexvis' | |
- name: Deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn install --frozen-lockfile | |
yarn verify | |
yarn generate:docs | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add docs/ | |
git commit -m "New docs" | |
git push -f origin HEAD:gh-pages |