Skip to content

pull-docs-from-main #165

pull-docs-from-main

pull-docs-from-main #165

name: pull-docs-from-main
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '40 6 * * 4' # 6:40am on Thursdays
workflow_dispatch:
inputs:
jobs:
update-docs-in-data:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
ref: data
- name: Merge from main
run: |
git config user.name intoverflow
git config user.email [email protected]
git fetch origin main
git merge -s recursive -X theirs --allow-unrelated-histories origin/main
- name: Delete and restore the docs
run: |
git rm -r docs || true
git checkout origin/main -- docs
- name: Push
run: |
git config user.name intoverflow
git config user.email [email protected]
git add docs
git commit -m "pull-docs-from-main update-docs-in-data" || true
git push
update-docs-in-docs:
needs: update-docs-in-data
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
ref: docs
- name: Merge from data
run: |
git config user.name intoverflow
git config user.email [email protected]
git fetch origin data
git merge -s recursive -X theirs --allow-unrelated-histories origin/data
- name: Delete and restore the docs
run: |
git rm -r docs || true
git checkout origin/data -- docs
- name: Install the dependencies
run: pip install -r requirements.txt
- name: Render the plots
run: python3 src/plot.py
- name: Commit and push
run: |
git config user.name intoverflow
git config user.email [email protected]
git add .
git add --force docs/source/_static/plots
git commit -m "pull-docs-from-main update-docs-in-docs" || true
git push