Skip to content

Setup workflows for publication of documentation #11

Setup workflows for publication of documentation

Setup workflows for publication of documentation #11

Workflow file for this run

name: Publish release documentation
on:
push:
branches: ['master']
paths: ['documentation/release-latest/**']
jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository == 'paul-dingemans/ktlint'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all commits/branches
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install mkdocs and mike
run: pip install mkdocs-material mike
- name: Config git
run: |
git config user.email "ktlint@github.com"
git config user.name "Ktlint Release Workflow"
- name: Get last released version
run: |
echo "version=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
echo "Last released version: ${{ env.version }}"
- name: Deploy release docs
run: |
cd documentation/release-latest
# Publish docs and update the "release" alias if needed
echo "Release docs to version ${{ env.version }}"
mike deploy --push --update-aliases ${{ env.version }} release