Skip to content
Snippets Groups Projects
Verified Commit 02163d14 authored by Šimon Berka's avatar Šimon Berka
Browse files
parent 6dd8458a
No related branches found
No related tags found
1 merge request!78feat: now deploys to cpanel hosting
......@@ -11,16 +11,19 @@ build-test:
- apk add python3
- apk add py3-pip
- apk add py3-yaml
- apk add openssh-client
script:
- hugo --config config.toml -D --destination=./public
pages:
deploy_cpanel:
before_script:
- apk update
- apk add git
- apk add python3
- apk add py3-pip
- apk add py3-yaml
- apk add openssh-client
- apk add curl
script:
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ics.muni.cz/cloud/hiera.git
- sed -i '11,$d' content/cloud/flavors/index.md
......@@ -29,10 +32,21 @@ pages:
- cat flavors.csv >> content/cloud/flavors/index.md
- echo "{{</csv-table>}}" >> content/cloud/flavors/index.md
- cat content/cloud/flavors/index.md
- sed -i -e "s/BUILDIDTAG/$CI_COMMIT_SHORT_SHA/g" ./layouts/partials/site-footer.html
- hugo --config config.toml -D --destination=./public
artifacts:
paths:
- public
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_cpanel" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS_cpanel" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- ssh docscloudmuni@docs.cloud.muni.cz 'mkdir ~/tmpdeploy'
- scp -r ./public/* docscloudmuni@docs.cloud.muni.cz:~/tmpdeploy
- ssh docscloudmuni@docs.cloud.muni.cz 'mv ~/public_html ~/todelete && mv ~/tmpdeploy ~/public_html && rm -rf ~/todelete'
- sleep 5
- latest_commit=$(git log -1 --pretty=format:%h )
- "curl -H 'Cache-Control: no-cache' https://docs.cloud.muni.cz | grep $latest_commit"
only:
- master
\ No newline at end of file
- master
baseURL = "https://cloud.gitlab-pages.ics.muni.cz/documentation/"
baseURL = "https://docs.cloud.muni.cz/"
languageCode = "en-us"
title = "Metacentrum Cloud Documentation"
theme = "hugo-geekdoc"
......
<footer class="gdoc-footer">
<div class="container flex flex-wrap">
build: BUILDIDTAG
{{ with .Site.Params.GeekdocLegalNotice }}
<span class="gdoc-footer__item">
<a href="{{ . | relURL }}" class="gdoc-footer__link">Legal Notice</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment