Skip to content

docs

docs #563

Workflow file for this run

name: "📘 Deploy docs"
on:
workflow_dispatch:
workflow_call:
push:
branches:
- master
paths:
- "packages/docs/**"
- "CHANGELOG.md"
jobs:
deploy-docs:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
LEMONSQUEEZY_API_KEY: ${{ secrets.LEMONSQUEEZY_API_KEY }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
GH_API_KEY: ${{ secrets.GH_API_KEY }}
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
github.event_name == 'push' ||
github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
clean: false
- name: Setup Bun
uses: oven-sh/[email protected]
- name: Install dependencies
run: bun i
- name: Build package
run: bun run build
- name: Add robots.txt if not main repo
if: github.repository != 'saadeghi/daisyui'
run: |
echo 'User-agent: *
Disallow: /' > packages/docs/static/robots.txt
- name: Build docs
run: bun run build:docs
- name: Deploy docs to github pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/docs/build
cname: ${{ secrets.CNAME }}