Skip to content

Feat/supress sub config repr (#285) #102

Feat/supress sub config repr (#285)

Feat/supress sub config repr (#285) #102

name: Deploy Development Docs
on:
push:
branches:
- 'release/**'
paths:
- 'src/**.py'
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set GitHub Actions as Commit Author
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Checkout main repo
uses: actions/checkout@main
with:
path: 'main-repo'
- name: Set up Python 3.9
uses: actions/setup-python@main
with:
python-version: 3.9
cache: 'pip'
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
cd main-repo
python -m pip install --upgrade pip
pip install --editable ".[dev]"
- name: Checkout dev docs repo
uses: actions/checkout@main
with:
repository: a-rich/DJ-Tools-dev-docs
path: 'dev-docs-repo'
token: ${{ secrets.DJTOOLS_WORKFLOWS }}
- name: Update and deploy docs
run: |
cd dev-docs-repo/
rm -rf docs && rm -rf src
cp -r ../main-repo/docs . && cp -r ../main-repo/src .
mkdocs gh-deploy --force --config-file docs/mkdocs.yml
- name: Commit changes
run: |
cd dev-docs-repo/
git add .
git commit -m "Deploy docs: $GITHUB_SHA"
git push --force