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
|
image: klakegg/hugo:alpine-ci
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- hugo -D
|
- hugo --baseURL=https://new.janw.name
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
expire_in: 1 week
|
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:
|
deploy:
|
||||||
image: debian:bullseye
|
image: debian:bullseye
|
||||||
|
@ -26,5 +40,22 @@ deploy:
|
||||||
- apt-get install rsync -y
|
- apt-get install rsync -y
|
||||||
script:
|
script:
|
||||||
- rsync -avz --rsh="ssh -p 17295" ./public/ janw-name@janw.name:/var/www/new.janw.name/
|
- 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:
|
only:
|
||||||
- main
|
- main
|
||||||
|
|
Loading…
Reference in a new issue