James Harton
8aeefac13b
All checks were successful
continuous-integration/drone/push Build is passing
87 lines
2 KiB
YAML
87 lines
2 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: deploy
|
|
|
|
steps:
|
|
- name: submodules
|
|
image: alpine/git
|
|
commands:
|
|
- git submodule update --init --recursive
|
|
|
|
- name: restore ASDF cache
|
|
image: meltwater/drone-cache
|
|
pull: "always"
|
|
environment:
|
|
AWS_ACCESS_KEY_ID:
|
|
from_secret: ACCESS_KEY_ID
|
|
AWS_SECRET_ACCESS_KEY:
|
|
from_secret: SECRET_ACCESS_KEY
|
|
AWS_PLUGIN_PATH_STYLE: true
|
|
settings:
|
|
restore: true
|
|
endpoint:
|
|
from_secret: S3_ENDPOINT
|
|
bucket:
|
|
from_secret: CACHE_BUCKET
|
|
region: us-east-1
|
|
path-style: true
|
|
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
|
mount:
|
|
- .asdf
|
|
|
|
- name: install dependencies
|
|
image: code.harton.nz/james/asdf_container:latest
|
|
pull: "always"
|
|
environment:
|
|
ASDF_DATA_DIR: /drone/src/.asdf
|
|
ASDF_DIR: /root/.asdf
|
|
commands:
|
|
- asdf_install
|
|
- rm -rf .asdf/downloads
|
|
|
|
- name: store ASDF cache
|
|
image: meltwater/drone-cache
|
|
pull: "always"
|
|
environment:
|
|
AWS_ACCESS_KEY_ID:
|
|
from_secret: ACCESS_KEY_ID
|
|
AWS_SECRET_ACCESS_KEY:
|
|
from_secret: SECRET_ACCESS_KEY
|
|
AWS_PLUGIN_PATH_STYLE: true
|
|
settings:
|
|
rebuild: true
|
|
override: false
|
|
endpoint:
|
|
from_secret: S3_ENDPOINT
|
|
bucket:
|
|
from_secret: CACHE_BUCKET
|
|
region: us-east-1
|
|
path-style: true
|
|
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
|
mount:
|
|
- .asdf
|
|
|
|
- name: zola build
|
|
image: code.harton.nz/james/asdf_container:latest
|
|
pull: "always"
|
|
environment:
|
|
ASDF_DATA_DIR: /drone/src/.asdf
|
|
ASDF_DIR: /root/.asdf
|
|
commands:
|
|
- asdf zola build
|
|
|
|
- name: publish
|
|
image: minio/mc
|
|
environment:
|
|
S3_ENDPOINT:
|
|
from_secret: S3_ENDPOINT
|
|
ACCESS_KEY:
|
|
from_secret: ACCESS_KEY_ID
|
|
SECRET_KEY:
|
|
from_secret: SECRET_ACCESS_KEY
|
|
commands:
|
|
- mc alias set store $${S3_ENDPOINT} $${ACCESS_KEY} $${SECRET_KEY}
|
|
- mc mb -p store/www.harton.nz
|
|
- mc anonymous set download store/www.harton.nz
|
|
- mc mirror --overwrite public/ store/www.harton.nz/
|
|
|