Skip to content

Agent Post Release #104

Agent Post Release

Agent Post Release #104

Workflow file for this run

name: Agent Post Release
on:
workflow_dispatch:
workflow_run:
workflows: ["Create Release"]
types:
- completed
jobs:
update-docs:
# Check if this was a manual invocation*workflow_dispatch) or triggered(workflow_run) and successful
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run && github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
steps:
- uses: actions/checkout@v3
with:
# The script `publish-docs` below needs to perform a merge, so
# it needs the full history to perform this merge.
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Setup GitHub Credentials
run: |
git config user.name $GITHUB_ACTOR
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
- name: Get Created Tag
id: get_tag
run: echo "latest_tag=$(cat package.json | jq .version)" >> $GITHUB_OUTPUT
- name: Publish API Docs
run: npm run publish-docs
- name: Create Docs Website PR
run: node ./bin/create-docs-pr.js --tag v${{ steps.get_tag.outputs.latest_tag }}
env:
GITHUB_TOKEN: ${{ secrets.NODE_AGENT_GH_TOKEN }}
GITHUB_USER: ${{ vars.NODE_AGENT_CI_USER_NAME }}
GITHUB_EMAIL: ${{ vars.NODE_AGENT_CI_USER_EMAIL }}