File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments