Skip to content

fix: typedoc generation #4

fix: typedoc generation

fix: typedoc generation #4

Workflow file for this run

name: Publish & Deploy
on:
push:
tags:
- 'v*'
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
release-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Build Package & Docs
run: |
bun run build
bun run docs
# Verify build artifacts exist
- name: Verify Build
run: |
test -d ./docs || (echo "❌ Error: Docs directory missing" && exit 1)
test -f ./package.json || (echo "❌ Error: package.json missing" && exit 1)
# --- PUBLISH NPM ---
- name: Publish to NPM
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
# Tambah --provenance biar ada badge Verified di NPM
npm publish --access public --provenance
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# --- CREATE GITHUB RELEASE ---
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
dist/**
package.json
# --- DEPLOY PAGES ---
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4