37 lines
771 B
YAML
37 lines
771 B
YAML
|
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"
|