Skip to content

Commit 7d72354

Browse files
committed
Automatically sync documentations
1 parent feacb99 commit 7d72354

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/sync-doc.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: 'Sync Documentation'
3+
4+
on:
5+
# Allow manual trigger
6+
push:
7+
branches:
8+
- 'automatic-sync-doc'
9+
workflow_dispatch:
10+
# Run weekly on Saturdays at 2 AM UTC (weekend schedule)
11+
schedule:
12+
- cron: '0 2 * * 6'
13+
14+
jobs:
15+
auto-build:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 18
30+
cache: npm
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Run production build
36+
run: npm run build:prod
37+
38+
- name: Create Pull Request if changes exist
39+
uses: peter-evans/create-pull-request@v5
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
commit-message: 'Automatic documentation sync [skip ci]'
43+
title: 'Automatic documentation sync - ${{ github.run_number }}'
44+
body: |
45+
🤖 **Automatic documentation sync**
46+
47+
This PR contains updates generated by the weekly automated build process (`npm run build:prod`).
48+
49+
**Schedule:** Every Saturday at 2 AM UTC
50+
**Workflow Run:** [${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
51+
52+
Please review the changes.
53+
branch: auto-build-${{ github.run_number }}
54+
delete-branch: true

0 commit comments

Comments
 (0)