Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build Documentation - Debug" | |
on: | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: write | |
pull-requests: write | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
id-token: write | |
env: | |
PYTHONPATH: /home/runner/work/hoa-moe/hoa-moe | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
submodules: recursive | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_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.11" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r scripts/requirements.txt | |
- name: Fetch public repositories in the organization | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./scripts/workflows/fetch_repos.sh | |
- name: Parse the repo names and save as env vars | |
id: parse_repos | |
run: | | |
repos=$(jq -r '.[].name' repos.json | jq -R -s -c 'split("\n")[:-1]') | |
echo "repos_array=$repos" >> $GITHUB_ENV | |
- name: Generate card.txt for each repo | |
run: python scripts/courses/gen_links.py "HITSZ-OpenAuto" ${{ secrets.GITHUB_TOKEN }} | |
- name: Bulid directory pages | |
run: ./scripts/workflows/build_directory_pages.sh | |
- name: Build course pages | |
run: python scripts/courses/build_course_pages.py "HITSZ-OpenAuto" ${{ secrets.GITHUB_TOKEN }} | |
- name: Build semester pages | |
run: ./scripts/workflows/build_semester_pages.sh | |
- name: Generate daily report | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORG_NAME: HITSZ-OpenAuto | |
NEWS_TYPE: daily | |
run: python scripts/news/gen_news.py | |
- name: Fetch opened PRs and issues | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python scripts/courses/fetch_opened_prs_and_issues.py | |
- name: Wrap badges | |
env: | |
PYTHONPATH: /home/runner/work/hoa-moe/hoa-moe | |
run: | | |
for file in $(find content/docs -name "*.md"); do | |
python scripts/courses/wrap_badges.py "$file" | |
done | |
- name: Auto correct | |
uses: huacnlee/autocorrect-action@v2 | |
with: | |
args: --fix content/ |