Skip to content

Fetch External Content #38

Fetch External Content

Fetch External Content #38

name: Fetch External Content
on:
schedule:
- cron: '0 3 * * *' # Daily at 3 AM UTC
workflow_dispatch:
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 https://github.com/simplicitesoftware/documentation.git temp_docs
cp -r temp_docs/docs/* external_docs/
rm -rf temp_docs
- name: Clone community-solved-topics repo
run: |
rm -rf external_solved_topics
mkdir external_solved_topics
git clone --depth 1 https://github.com/simplicitesoftware/community-solved-topics.git temp_topics
cp -r temp_topics/topics/* external_solved_topics/
rm -rf temp_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