-
Notifications
You must be signed in to change notification settings - Fork 32
38 lines (32 loc) · 1.29 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: deploy-main
on:
push:
branches: [ main,release-* ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python dependencies
run: python3 -m pip install -r ./requirements.txt
- name: Configure Git user
run: |
git config --local user.email "${GITHUB_ACTOR}@users.noreply.${GITHUB_DOMAIN:-"github.com"}"
git config --local user.name "${GITHUB_ACTOR}"
- name: Configure Git user
run: git fetch origin gh-pages --depth=1
- name: Deploy with mike
run: |
if [ "$GITHUB_REF_NAME" == "main" ]; then
# Latest version of the docs goes under https://elastisys.io/compliantkubernetes
VERSION_TITLE="main"
VERSION="compliantkubernetes ck8s"
else
# Other versions go under https://elastisys.io/compliantkubernetes-v0.25/
VERSION_TITLE=$(echo "$GITHUB_REF_NAME" | cut -d- -f2)
VERSION="compliantkubernetes-${VERSION_TITLE}"
fi
echo version: $VERSION version-title: $VERSION_TITLE
mike deploy $VERSION -t $VERSION_TITLE
mike set-default compliantkubernetes --push