ci: overwrite baseurl
This commit is contained in:
parent
af39230253
commit
fd06881c6b
1 changed files with 32 additions and 1 deletions
|
@ -6,11 +6,25 @@ build:
|
|||
image: klakegg/hugo:alpine-ci
|
||||
stage: build
|
||||
script:
|
||||
- hugo -D
|
||||
- hugo --baseURL=https://new.janw.name
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 1 week
|
||||
only:
|
||||
- release
|
||||
|
||||
build-draft:
|
||||
image: klakegg/hugo:alpine-ci
|
||||
stage: build
|
||||
script:
|
||||
- hugo -D --baseURL=https://draft.janw.name
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 1 week
|
||||
only:
|
||||
- main
|
||||
|
||||
deploy:
|
||||
image: debian:bullseye
|
||||
|
@ -26,5 +40,22 @@ deploy:
|
|||
- apt-get install rsync -y
|
||||
script:
|
||||
- rsync -avz --rsh="ssh -p 17295" ./public/ janw-name@janw.name:/var/www/new.janw.name/
|
||||
only:
|
||||
- release
|
||||
|
||||
deploy-draft:
|
||||
image: debian:bullseye
|
||||
stage: deploy
|
||||
before_script:
|
||||
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
- apt-get install rsync -y
|
||||
script:
|
||||
- rsync -avz --rsh="ssh -p 17295" ./public/ janw-name@janw.name:/var/www/draft.janw.name/
|
||||
only:
|
||||
- main
|
||||
|
|
Loading…
Reference in a new issue