| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- name: Publish Docs to NPM
- on:
- workflow_dispatch:
- inputs:
- branch:
- description: 'Branch to publish from'
- required: true
- default: 'docs-v2-migration'
- type: string
- jobs:
- publish:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- id-token: write
- defaults:
- run:
- working-directory: docs
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- ref: ${{ inputs.branch }}
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '24.x'
- registry-url: 'https://registry.npmjs.org'
- - name: Update npm
- run: npm install -g npm@latest
- - name: Install dependencies
- run: npm install
- - name: Build
- run: npm run build
- - name: Generate timestamp version
- id: version
- run: echo "version=0.0.0-$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- - name: Set package version
- run: npm version ${{ steps.version.outputs.version }} --no-git-tag-version
- - name: Publish to NPM
- run: npm publish --access public
|