Skip to content

release: prep v0.6.2 (#510) #12

release: prep v0.6.2 (#510)

release: prep v0.6.2 (#510) #12

Workflow file for this run

name: Publish Docs
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com'
- name: Extract version from tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
cd docs && npm version $VERSION --no-git-tag-version --allow-same-version
- name: Generate docs
run: go run ./cmd/ox docs --output docs/reference
- name: Publish to GitHub Packages
working-directory: docs
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger docs site update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DISPATCH_TOKEN }}
repository: sageox/sageox-monorepo
event-type: cli-docs-updated
client-payload: '{"version": "${{ env.VERSION }}"}'