File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Auto push to live
2+
3+ on :
4+ schedule :
5+ # Run at 10:00 a.m., 6:00 p.m., and 2:00 a.m. UTC
6+ - cron : " 0 10 * * *"
7+ - cron : " 0 18 * * *"
8+ - cron : " 0 2 * * *"
9+
10+ workflow_dispatch :
11+
12+ jobs :
13+ auto-push-to-live :
14+ runs-on : ubuntu-latest
15+ if : github.repository_owner == 'MicrosoftDocs'
16+ permissions :
17+ contents : write
18+ pull-requests : write
19+
20+ steps :
21+ # Checkout the automation branch
22+ - name : Checkout automation branch
23+ uses : actions/checkout@v3
24+ with :
25+ ref : automation # Explicitly check out the automation branch
26+
27+ # Set up Python
28+ - name : Set up Python
29+ uses : actions/setup-python@v4
30+ with :
31+ python-version : ' 3.12'
32+
33+ # Install dependencies (if any)
34+ - name : Install dependencies
35+ run : |
36+ python -m pip install PyGithub
37+
38+ # Run the Python script
39+ - name : Run script
40+ env :
41+ GITHUB_ACCESS_TOKEN : ${{ secrets.DELAND_PAT }}
42+ run : |
43+ ls scripts
44+ python scripts/auto_push2live.py
You can’t perform that action at this time.
0 commit comments