Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snack] Version the docs #301

Merged
merged 2 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/doc-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: derived/docs/site
keep_files: true
28 changes: 27 additions & 1 deletion .github/workflows/release_latest_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
MODULES: api ui functions/aou functions/sg
MODULES: api ui functions/aou functions/sg docs

steps:
- name: prepare sources
Expand Down Expand Up @@ -170,3 +170,29 @@ jobs:

- name: tag-and-push-images
run: ./ops/cli.py tag-and-push-images

- name: Read Version Data
id: version
run: |
echo "::set-output name=VERSION::v$(cat version)"
echo "::set-output name=CHANGELOG::$(sed -n '1d;/$#/!p;//q' CHANGELOG.md)"
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: derived/docs/site
keep_files: true
destination_dir: ${{ steps.version.outputs.VERSION }}

- name: Add Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.VERSION }}
body: |
Docs available at [broadinstitute.github.io/wfl/${{ steps.version.outputs.VERSION }}](https://broadinstitute.github.io/wfl/${{ steps.version.outputs.VERSION }})
[Changes](https://github.com/broadinstitute/wfl/blob/${{ steps.version.outputs.VERSION }}/CHANGELOG.md):
${{ steps.version.outputs.CHANGELOG }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is this step of Action will create a separate git tag for the docs, in addition to what make_git_tag in cli.py created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The create-release action here only makes a tag if one doesn't already exist (see how commitish here is unused if the tag already exists). The action here is like if we went to the releases page ourselves and made a release from an existing tag.

Tags are already present on the releases page anyway, this just formalizes it so we can add some description text

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for the explanation!