Skip to content

Update About Page

Update About Page #35

Workflow file for this run

name: Update About Page
on:
schedule:
- cron: "0 0 * * *" # This sets the workflow to run at 00:00 UTC+0 every day (8 AM Beijing time)
push:
paths:
- "scripts/about/update_about.py"
workflow_dispatch:
jobs:
update-about-page:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
env:
PYTHONPATH: /home/runner/work/hoa-moe/hoa-moe
steps:
- name: Checkout
uses: actions/checkout@v4 # checkout the repository content to github runner
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Set execute permissions
run: find ./scripts \( -name "*.sh" -o -name "*.py" \) -exec chmod +x {} \;
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Execute Python script
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python scripts/about/update_about.py
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
add: "content/about/index.zh-cn.md"
pull: "--rebase --autostash"
default_author: github_actions
message: "ci: update about page"