Add initial gitlab-ci configuration
This commit is contained in:
parent
86ea16a422
commit
5ecf5bafd1
1 changed files with 36 additions and 0 deletions
36
.gitlab-ci.yaml
Normal file
36
.gitlab-ci.yaml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
image: fedora:latest
|
||||||
|
variables:
|
||||||
|
BUILDDIR: "build/"
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- dnf install -y hugo
|
||||||
|
script:
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- hugo
|
||||||
|
artifacts:
|
||||||
|
expire_in: 12 hours
|
||||||
|
paths:
|
||||||
|
- "public/"
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
environment:
|
||||||
|
name: production
|
||||||
|
url: https://status-devel.ungleich.ch/
|
||||||
|
before_script:
|
||||||
|
# Configure the SSH Agent
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$CD_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
script:
|
||||||
|
- sftp -r fnux@staticwebhosting.ungleich.ch <<< "put -r public/* public_html/status-devel"
|
Loading…
Add table
Reference in a new issue