Skip to content

Commit

Permalink
[Snack] Version the docs (#301)
Browse files Browse the repository at this point in the history
* Make normal doc updates not trample other files it sees...

* Make release process put docs in subfolder and add release

The magic sed command on line 178 is doing the following:
1. Skip the first line (it is a header)
2. Print everything that isn't a header
3. Quit at the next header
  • Loading branch information
jack-r-warren authored Jan 14, 2021
1 parent cf6a508 commit 7969998
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
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 }}

0 comments on commit 7969998

Please sign in to comment.