Download an official gohugo release instead of building it

This commit is contained in:
Thomas Schwery 2020-04-17 15:06:32 +02:00
parent 8d927dc8dd
commit 2966358f25

View file

@ -1,15 +1,12 @@
image: golang:1.12
variables: variables:
S3_BUCKET_NAME: thomas.inf3.ch S3_BUCKET_NAME: thomas.inf3.ch
AWS_BUCKET_REGION: us-east-1 AWS_BUCKET_REGION: us-east-1
gohugo-build-branch: gohugo-build-branch:
image: curlimages/curl:7.69.1
script: script:
- git submodule sync --recursive - curl -SsL https://github.com/gohugoio/hugo/releases/download/v0.63.2/hugo_0.63.2_Linux-64bit.tar.gz | tar zxvf - hugo
- git submodule update --init --recursive - ./hugo -b http://${S3_BUCKET_NAME}.s3-website-${AWS_BUCKET_REGION}.amazonaws.com/${CI_COMMIT_REF_SLUG}
- go get github.com/gohugoio/hugo
- hugo -b http://${S3_BUCKET_NAME}.s3-website-${AWS_BUCKET_REGION}.amazonaws.com/${CI_COMMIT_REF_SLUG}
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
@ -18,11 +15,10 @@ gohugo-build-branch:
- /^master$/ - /^master$/
gohugo-build-master: gohugo-build-master:
image: curlimages/curl:7.69.1
script: script:
- git submodule sync --recursive - curl -SsL https://github.com/gohugoio/hugo/releases/download/v0.63.2/hugo_0.63.2_Linux-64bit.tar.gz | tar zxvf - hugo
- git submodule update --init --recursive - ./hugo
- go get github.com/gohugoio/hugo
- hugo
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
@ -31,7 +27,7 @@ gohugo-build-master:
- /^master$/ - /^master$/
deploys3-branch: deploys3-branch:
image: "python:latest" image: python:latest
stage: deploy stage: deploy
before_script: before_script:
- pip install awscli - pip install awscli
@ -58,7 +54,7 @@ deploys3-master:
- /^master$/ - /^master$/
deploys3-clean: deploys3-clean:
image: "python:latest" image: python:latest
stage: deploy stage: deploy
before_script: before_script:
- pip install awscli - pip install awscli