docker-hugo/.drone.yml

25 lines
871 B
YAML
Raw Normal View History

2023-09-01 21:07:08 -05:00
kind: pipeline
name: default
steps:
- name: Download dart sass and hugo
2023-09-01 21:21:46 -05:00
image: debian:stable-slim
2023-09-01 21:07:08 -05:00
commands:
2023-09-01 21:21:46 -05:00
- 'apt update'
- 'apt install -y curl'
2023-09-01 21:55:04 -05:00
- 'SASS_URL=$(curl -s https://api.github.com/repos/sass/dart-sass/releases/latest | grep "browser_download_url.*dart-sass-.*-linux-x64.tar.gz" | cut -d : -f 2,3 | tr -d \")'
- 'curl $SASS_URL -LO'
2023-09-01 21:55:43 -05:00
- 'HUGO_URL=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*hugo_.*_linux-amd64.tar.gz" | cut -d : -f 2,3 | tr -d \")'
2023-09-01 21:55:04 -05:00
- 'curl $HUGO_URL -LO'
2023-09-01 21:21:46 -05:00
- 'tar -xf dart-sass-*.tar.gz'
- 'tar -xf hugo_*_linux-amd64.tar.gz --one-top-level'
2023-09-01 21:07:08 -05:00
- name: build and publish docker image
image: plugins/docker
pull: always
settings:
repo: askiiart/hugo
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password