File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed
Expand file tree Collapse file tree 1 file changed +58
-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 10 AM UTC (weekend schedule)
11+ schedule :
12+ - cron : ' 0 10 * * 6'
13+
14+ jobs :
15+ auto-build :
16+ runs-on : ubuntu-latest
17+ permissions :
18+ contents : write
19+ pull-requests : write
20+ env :
21+ APP_ENV : production
22+ steps :
23+ - name : Checkout repository
24+ uses : actions/checkout@v4
25+ with :
26+ token : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Setup Node.js
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : 18
32+ cache : npm
33+
34+ - name : Install dependencies
35+ run : npm ci
36+
37+ - name : Bootstrap documentation
38+ env :
39+ AMP_DOC_TOKEN : ${{ secrets.AMP_DOC_TOKEN }}
40+ run : npx gulp bootstrap
41+
42+ - name : Create Pull Request if changes exist
43+ uses : peter-evans/create-pull-request@v5
44+ with :
45+ token : ${{ secrets.GITHUB_TOKEN }}
46+ commit-message : ' Automatic documentation sync [skip ci]'
47+ title : ' Automatic documentation sync - ${{ github.run_number }}'
48+ body : |
49+ 🤖 **Automatic documentation sync**
50+
51+ This PR contains updates generated by the weekly automated build process (`npm run build:prod`).
52+
53+ **Schedule:** Every Saturday at 10 AM UTC
54+ **Workflow Run:** [${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
55+
56+ Please review the changes.
57+ branch : auto-build-${{ github.run_number }}
58+ delete-branch : true
You can’t perform that action at this time.
0 commit comments