forked from saadeghi/daisyui
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.33 KB
/
deploy-docs.yml
File metadata and controls
52 lines (45 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
clean: false
ref: master
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun i
- 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 --bun 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 }}