James Harton
3fcbb7acaa
All checks were successful
continuous-integration/drone/push Build is passing
87 lines
1.9 KiB
YAML
87 lines
1.9 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: build
|
|
|
|
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: harton.dev/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: harton.dev/james/asdf_container:latest
|
|
pull: "always"
|
|
environment:
|
|
ASDF_DATA_DIR: /drone/src/.asdf
|
|
ASDF_DIR: /root/.asdf
|
|
commands:
|
|
- asdf zola build
|
|
|
|
- name: publish
|
|
image: node:latest
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
environment:
|
|
CLOUDFLARE_ACCOUNT_ID:
|
|
from_secret: CLOUDFLARE_ACCOUNT_ID
|
|
CLOUDFLARE_API_TOKEN:
|
|
from_secret: CLOUDFLARE_API_TOKEN
|
|
commands:
|
|
- npx wrangler pages deploy public --project-name=wwwhartonnz --commit-dirty
|
|
|