Skip to content

Commit 05016ac

Browse files
authored
Automatically sync documentations (#6907)
1 parent 54a3291 commit 05016ac

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/sync-doc.yaml

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

0 commit comments

Comments
 (0)