Skip to content

Merge pull request #49 from observatorycontrolsystem/feature/update_v… #72

Merge pull request #49 from observatorycontrolsystem/feature/update_v…

Merge pull request #49 from observatorycontrolsystem/feature/update_v… #72

Workflow file for this run

name: Build docs
on:
push:
branches:
- main
# Run this workflow when a tag or branch is created
create:
jobs:
build:
if: github.event_name == 'create' && github.event.ref_type == 'tag' && github.event.repository.fork == false
runs-on: ubuntu-latest
env:
SECRET_KEY: fakesecretkey
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade poetry
poetry install
- name: Build docs
run: |
poetry run python manage.py generateschema --file configdb.yaml --generator_class=configdb.schema.ConfigDBSchemaGenerator
npx redoc-cli bundle configdb.yaml
mkdir docs; mv redoc-static.html docs/configdb.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3 # https://github.com/peaceiris/actions-gh-pages
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
external_repository: observatorycontrolsystem/observatorycontrolsystem.github.io
publish_dir: docs
destination_dir: assets/html
enable_jekyll: true
publish_branch: main
keep_files: true
exclude_assets: '.github,openapi,.redocly.yaml,LICENSE,README.md,make.sh'