Deploy documentation on self hosted static host
This commit is contained in:
parent
5abd30163f
commit
067adc83f0
|
@ -240,8 +240,8 @@ build_front:
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
pages:
|
build_documentation:
|
||||||
stage: test
|
stage: build
|
||||||
image: python:3.10
|
image: python:3.10
|
||||||
variables:
|
variables:
|
||||||
BUILD_PATH: "../public"
|
BUILD_PATH: "../public"
|
||||||
|
@ -268,6 +268,24 @@ pages:
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
deploy_documentation:
|
||||||
|
stage: deploy
|
||||||
|
image: alpine
|
||||||
|
dependencies:
|
||||||
|
- build_documentation
|
||||||
|
before_script:
|
||||||
|
- apk add openssh-client rsync
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
- eval `ssh-agent -s`
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
script:
|
||||||
|
- rsync -r -e "ssh -p 2282" $CI_PROJECT_DIR/public/ docs@docs.funkwhale.audio:/htdocs/
|
||||||
|
only:
|
||||||
|
- stable
|
||||||
|
|
||||||
|
|
||||||
.docker_publish:
|
.docker_publish:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: egon0/docker-with-buildx-and-git:bash
|
image: egon0/docker-with-buildx-and-git:bash
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<!-- This file makes sure user get automatically forwarded to the stable documentation. -->
|
|
||||||
<html lang="en-US">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="refresh" content="0; url=stable/index.html">
|
|
||||||
<script type="text/javascript">
|
|
||||||
window.location.href = "stable/index.html"
|
|
||||||
</script>
|
|
||||||
<title>Page Redirection</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
|
|
||||||
If you are not redirected automatically, follow this <a href='stable/index.html'>link</a>.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
Loading…
Reference in New Issue