Skip to content

Commit

Permalink
Update github action for doc generation.
Browse files Browse the repository at this point in the history
Point new doc builds to OCS Github pages repository. Only build docs on push to main and tag.
  • Loading branch information
mgdaily committed Jun 17, 2021
1 parent 3348e93 commit a0a9a9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/docs-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Build docs
# TODO: Change this to only push on tag on the main branch
on:
push:
branches:
- feature/openapi-doc
- 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:
CONFIGDB_URL: http://configdb-dev
Expand All @@ -27,11 +29,10 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 # https://github.com/peaceiris/actions-gh-pages
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
# TODO: point this to observatorycontrolsystem/observatorycontrolsystem.github.io (main branch)
external_repository: mgdaily/ocs-gh-pages
external_repository: observatorycontrolsystem/observatorycontrolsystem.github.io
publish_branch: main
publish_dir: docs
destination_dir: docs
enable_jekyll: true
publish_branch: main
keep_files: true
exclude_assets: '.github,openapi,.redocly.yaml,LICENSE,README.md,make.sh'
4 changes: 1 addition & 3 deletions downtime/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from setuptools_scm.version import ScmVersion

def version_scheme(version: ScmVersion) -> str:
"""
Simply return the string representation of the version object tag, which is the latest git tag.
""" Simply return the string representation of the version object tag, which is the latest git tag.
setuptools_scm does not provide a simple semantic versioning format without trying to guess the next release, or adding some metadata to the version.
"""
Expand All @@ -19,4 +18,3 @@ def get_schema(self, *args, **kwargs):
# Set the version to the latest git tag, and do not append any local information to the version number
schema['info']['version'] = get_version(version_scheme=version_scheme, local_scheme='no-local-version')
return schema

0 comments on commit a0a9a9c

Please sign in to comment.