Skip to content

Auto push to live

Auto push to live #305

Workflow file for this run

name: Auto push to live
on:
schedule:
# Run at 10:00 a.m., 6:00 p.m., and 2:00 a.m. UTC
- cron: "0 10 * * *"
- cron: "0 18 * * *"
- cron: "0 2 * * *"
workflow_dispatch:
jobs:
auto-push-to-live:
runs-on: ubuntu-latest
if: github.repository == 'MicrosoftDocs/SupportArticles-docs-pr'
permissions:
contents: write
pull-requests: write
steps:
# Checkout the automation branch
- name: Checkout automation branch
uses: actions/checkout@v3
with:
ref: automation # Explicitly check out the automation branch
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
# Install dependencies (if any)
- name: Install dependencies
run: |
python -m pip install PyGithub
# Run the Python script
- name: Run script
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.DELAND_PAT }}
run: |
ls scripts
python scripts/auto_push2live.py