Skip to content

Commit

Permalink
Setup workflows for publication of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Dingemans committed Apr 25, 2023
1 parent 130da7f commit 9e3271e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ jobs:
with:
python-version: 3.x

- name: Get version
id: get_version
if: ${{ success() }}
run: |
echo "version=${GITHUB_REF/refs\/tags\//}"
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Install mkdocs and mike
run: pip install mkdocs-material mike

- run: |
pip install mkdocs-material mike
cd documentation/release-latest
- name: Config git
run: |
git config user.email "ktlint@github.com"
git config user.name "Ktlint Release Workflow"
LATEST_TAG=$(git describe --abbrev=0 --tags)
echo "Release docs to version ${LATEST_TAG}"
- name: Get last released version
run: echo "version=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV

- name: Deploy release docs
run: |
cd documentation/release-latest
# Publish docs and update the "release" alias if needed
mike deploy --push --update-aliases ${LATEST_TAG} release
echo "Release docs to version ${env.version}"
mike deploy --push --update-aliases ${env.version} release
2 changes: 1 addition & 1 deletion documentation/release-latest/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: Ktlint (0.49.5)
site_name: Ktlint (0.40.6)
site_url: https://pinterest.github.io/ktlint/

extra:
Expand Down

0 comments on commit 9e3271e

Please sign in to comment.