-
-
Notifications
You must be signed in to change notification settings - Fork 10
37 lines (37 loc) · 1.05 KB
/
docs.yml
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
name: Publish docs
on:
workflow_dispatch:
push:
branches: [main]
release:
types: [released]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build site
run: bun run docs:build
- name: Generate Netlify redirects file
run: python scripts/generate-redirects.py
- name: Publish to Cloudflare Pages
id: cloudflare-publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 8e782a355544971b192db9e75d789dca
projectName: 9koctober
directory: .vitepress/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: mshick/add-pr-comment@v2
with:
message: |
🚀 This branch can be previewed at ${{ steps.cloudflare-publish.outputs.url }}