-
Notifications
You must be signed in to change notification settings - Fork 31
82 lines (65 loc) · 2.08 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: deploy
"on":
push:
branches:
- main
- release-*
schedule:
# At 03:45 each day
- cron: "45 3 * * *"
workflow_dispatch: {}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements.txt
- name: Install Node dependencies
run: npm ci
- 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: Show CI environment for debugging
run: |
set -x
id
pwd
git log -1
git status
cat /etc/lsb-release
dpkg -l
npm version
npm ls
python3 --version
pip3 list
set +x
- name: Auto-generate documentation
run: ./scripts/jsonschema2md.sh
- name: Deploy with mike
run: |
if [ "$GITHUB_REF_NAME" == "main" ]; then
# Latest version of the docs goes under https://elastisys.io/welkin
VERSION_TITLE="main"
VERSION="welkin compliantkubernetes ck8s"
else
# Other versions go under https://elastisys.io/welkin-v0.42/
VERSION_TITLE=$(echo "$GITHUB_REF_NAME" | cut -d- -f2)
VERSION="welkin-${VERSION_TITLE} compliantkubernetes-${VERSION_TITLE}"
fi
echo version: $VERSION version-title: $VERSION_TITLE
mike deploy $VERSION -t $VERSION_TITLE --push --template overrides/redirect.html --alias-type redirect
mike set-default welkin --push --template overrides/redirect.html