slides.fleaz.me/.gitlab-ci.yml
2020-04-02 23:59:39 +02:00

32 lines
603 B
YAML

cache:
untracked: true
paths:
- node_modules/
stages:
- build
- deploy
build:
stage: build
image: golang:1-alpine
artifacts:
paths:
- dist
script:
- apk add --no-cache imagemagick pkgconfig imagemagick-dev gcc libc-dev
- mkdir previews
- mkdir dist
- go run main.go
- mv index.html dist/
- mv previews/ dist/
- mv talks/ dist/
deploy:
stage: deploy
image: node:12-alpine
script:
- npm i -g netlify-cli
- netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --prod
rules:
- if: '$CI_COMMIT_BRANCH == "master"'