Update version, update changelog #129
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
python -m pip install 'poetry>=1.1,<1.2' | |
poetry install | |
- name: Build docs | |
run: | | |
poetry run python manage.py generateschema --file science-archive.yaml --generator_class archive.schema.ScienceArchiveSchemaGenerator | |
npx redoc-cli bundle science-archive.yaml | |
mkdir openapi; mv redoc-static.html openapi/science-archive.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: openapi | |
destination_dir: assets/html | |
enable_jekyll: true | |
publish_branch: main | |
keep_files: true | |
exclude_assets: '.github,openapi,.redocly.yaml,LICENSE,README.md,make.sh' |