Skip to content

Fetch External Content #1

Fetch External Content

Fetch External Content #1

name: Fetch External Content
on:
schedule:
- cron: '0 3 * * *' # Every day at 03:00 UTC
workflow_dispatch: # Allows manual trigger
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Fetch `docs/` from documentation repo
run: |
rm -rf external_docs
mkdir external_docs
git clone --depth 1 --filter=blob:none --sparse https://github.com/simplicitesoftware/documentation.git temp_docs
cd temp_docs
git sparse-checkout set docs
cp -r docs ../external_docs
cd ..
rm -rf temp_docs
- name: Clone community-solved-topics repo
run: |
rm -rf external_solved_topics
git clone --depth 1 https://github.com/simplicitesoftware/community-solved-topics.git external_solved_topics
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add external_docs external_solved_topics
git commit -m "chore: update external content [CI skip]" || echo "No changes to commit"
git push