Skip to content

Commit af347d1

Browse files
F30rudis
andcommitted
CI: Automatically deploy docs to ctf-gameserver.org
Co-authored-by: Simon Ruderich <[email protected]>
1 parent 5eed765 commit af347d1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,41 @@ jobs:
103103
name: debian-code-coverage-report
104104
path: htmlcov
105105
if-no-files-found: error
106+
107+
build_docs:
108+
name: Build documentation
109+
runs-on: ubuntu-latest
110+
container: python:3.13-trixie
111+
steps:
112+
- uses: actions/checkout@v4
113+
- run: pip install mkdocs
114+
- run: mkdocs build --strict
115+
- name: Store docs build
116+
uses: actions/upload-artifact@v4
117+
with:
118+
name: docs_site
119+
path: docs_site
120+
if-no-files-found: error
121+
122+
deploy_docs:
123+
name: Deploy docs to ctf-gameserver.org
124+
runs-on: ubuntu-latest
125+
environment: ctf-gameserver.org
126+
if: github.ref == 'refs/heads/master'
127+
needs:
128+
- lint
129+
- test_pypi
130+
- test_debian
131+
- build_docs
132+
steps:
133+
- uses: actions/download-artifact@v4
134+
with:
135+
name: docs_site
136+
path: docs_site
137+
- run: sudo apt-get --yes update
138+
- run: sudo apt-get --yes install --no-install-recommends openssh-client rsync
139+
- run: mkdir ~/.ssh
140+
- run: echo "${{ vars.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
141+
- run: echo "${{ secrets.SSH_KEY_PRIVATE }}" > ~/.ssh/id_ed25519
142+
- run: chmod 600 ~/.ssh/id_ed25519
143+
- run: rsync -a --delete --delete-delay --delay-updates docs_site/ [email protected]:site/

0 commit comments

Comments
 (0)