Skip to content

Commit cff4943

Browse files
authored
Merge pull request #8706 from MicrosoftDocs/main
Auto push to live 2025-04-14 15:31:45
2 parents 051b20b + f330544 commit cff4943

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/auto_publish.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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

0 commit comments

Comments
 (0)