submodule #5196
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: submodule | |
on: | |
pull_request: | |
branches: | |
- main | |
schedule: | |
# Run every 6 hours Every Day | |
- cron: "0 0/6 * * *" | |
workflow_dispatch: | |
jobs: | |
check-update: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- run: bash ./scripts/check_submodules.sh | |
check-ipynb-to-md: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- run: | | |
pip install pip wheel setuptools -Uqq | |
pip install -r ./scripts/requirements.txt -Uqq | |
- name: Check tutorials | |
run: | | |
bash ./scripts/nb_to_md.sh static/examples/tutorials/beginner tmp/tutorials/beginner | |
bash ./scripts/nb_to_md.sh static/examples/tutorials/intermediate tmp/tutorials/intermediate | |
bash ./scripts/nb_to_md.sh static/examples/tutorials/advanced tmp/tutorials/advanced | |
diff -r src/tutorials/beginner tmp/tutorials/beginner | |
diff -r src/tutorials/intermediate tmp/tutorials/intermediate | |
diff -r src/tutorials/advanced tmp/tutorials/advanced | |
- name: Check how-to-guides | |
run: | | |
bash ./scripts/nb_to_md.sh static/examples/how-to-guides tmp/how-to-guides | |
diff -r src/how-to-guides tmp/how-to-guides --exclude=_index.md | |
auto-pr: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- run: | | |
pip install pip wheel setuptools -Uqq | |
pip install -r ./scripts/requirements.txt -Uqq | |
- run: git submodule update --remote -- static/examples | |
- run: rm -rf src/how-to-guides/[0-9][0-9]-*.md | |
- run: rm -rf src/tutorials/**/[0-9][0-9]-*.md | |
- run: bash ./scripts/nb_to_md.sh static/examples/tutorials/beginner src/tutorials/beginner | |
- run: bash ./scripts/nb_to_md.sh static/examples/tutorials/intermediate src/tutorials/intermediate | |
- run: bash ./scripts/nb_to_md.sh static/examples/tutorials/advanced src/tutorials/advanced | |
- run: bash ./scripts/nb_to_md.sh static/examples/how-to-guides src/how-to-guides | |
- uses: peter-evans/create-pull-request@v6 | |
with: | |
title: '[automated] Submodule update' | |
body: This is an automated pull request. | |
commit-message: 'chore: update submodules' | |
branch: submodule-update |