Files
blog-ahmza-com/.gitlab-ci.yml
T

39 lines
788 B
YAML

stages:
- build
- dockerize
variables:
CONTAINER_IMAGE: registry.gitlab.com/ahmza/blog:latest
GIT_SUBMODULE_STRATEGY: recursive
Build:
stage: build
image: alpine:latest
before_script:
- which curl || ( apk update && apk add curl )
- curl -L https://github.com/gohugoio/hugo/releases/download/v0.90.0/hugo_0.90.0_Linux-64bit.tar.gz > hugo.tar.gz
- tar -zxf hugo.tar.gz
- mv hugo /usr/local/bin
script:
- hugo
artifacts:
name: "webfiles"
paths:
- public
only:
- main
Dockerize:
stage: dockerize
image:
name: nginx:latest
script:
- mv nginx.conf /etc/nginx/nginx.conf
- mv public /usr/share/nginx/html
- ls /etc/nginx/
- ls /usr/share/nginx/html
- ls /usr/share/nginx/html/public
only:
- main