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

Improved documentation workflow #1037

Merged
merged 1 commit into from
Sep 10, 2023
Merged
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
29 changes: 9 additions & 20 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
---
name: Build and deploy documentation on merge to master

on:
push:
branches:
- master
paths:
- 'docs/**'
- 'requirements.docs.txt'
- 'mkdocs.yml'
- 'CNAME'

jobs:
build:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout kapitan recursively
uses: actions/checkout@master
with:
submodules: recursive
- name: Strip git ref prefix from tag version and store in TAG_VERSION
run: |
echo "TAG_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
echo "REF_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Strip full version and just keep major part in MAJOR_VERSION VAR
run: |
echo "MAJOR_VERSION=${TAG_VERSION:0:4}" >> $GITHUB_ENV

# Printing versions needs to be a separate step,
# as they aren't set during the previous two steps
- name: Print Versions
run: |
echo ${{ env.TAG_VERSION }}
echo ${{ env.MAJOR_VERSION }}
echo ${{ env.REF_NAME }}
uses: actions/checkout@v4

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
Expand Down