Repository navigation
58 lines (49 loc) · 1.78 KB
/
Copy pathsync-org-docs.yml
File metadata and controls
58 lines (49 loc) · 1.78 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
53
54
55
56
57
58
# Syncs READMEs and docs from every active project in the tuna-os GitHub
# org into the Docusaurus site. Runs daily; opens a PR on changes.
#
# New repos with a README are automatically picked up — no per-project
# config needed here (see scripts/sync-org-docs.mjs for the repo list).
name: sync-org-docs
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-26.04
if: ${{ github.repository == 'tuna-os/docs' }}
steps:
- uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Sync docs from all tuna-os org repos
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/sync-org-docs.mjs
# Compile the generated pages before opening a PR. This keeps an
# MDX-incompatible upstream document from blocking the next sync PR's
# bootstrap checks with errors discovered only after creation.
- name: Build the synchronized site
run: npm run build
- name: Create PR if changed
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: sync org-wide project docs'
title: 'chore: sync org-wide project docs'
body: |
Automated sync of READMEs and docs from all active
[tuna-os](https://github.com/tuna-os) repos.
Review for content accuracy before merging.
branch: automation/sync-org-docs
delete-branch: true
labels: documentation