2022-02-01 11:10:24 +01:00
|
|
|
---
|
2023-03-11 18:58:24 +01:00
|
|
|
# drone encrypt ResiLien/resilien $AWS_ACCESS_KEY_ID
|
2022-02-01 11:10:24 +01:00
|
|
|
kind: secret
|
2022-12-05 12:38:12 +01:00
|
|
|
name: STAGING_AWS_ACCESS_KEY_ID
|
2023-03-11 18:58:24 +01:00
|
|
|
data: G2+At01T+nHq5E5aux9q5yINOJVr9jCPZWzEUmkr2NHn8kj7TqTHA+yHJgvcH7XK8IvgySek
|
2022-02-01 11:10:24 +01:00
|
|
|
|
|
|
|
---
|
2023-03-11 18:58:24 +01:00
|
|
|
# drone encrypt ResiLien/resilien $AWS_SECRET_ACCESS_KEY
|
2022-02-01 11:10:24 +01:00
|
|
|
kind: secret
|
2022-12-05 12:38:12 +01:00
|
|
|
name: STAGING_AWS_SECRET_ACCESS_KEY
|
2023-03-11 18:58:24 +01:00
|
|
|
data: OkX4OtUt9WigXChRza7Vhl7Ii7UZVXlop7u5ly3aZweCxvDjgjM9dWW9TWnkNb7tCJLDUsYdTMBdyQ7CVxw8ySxFsLapyrvETgH5ceNayDIRC5C1vULqyomgqWU=
|
2022-02-01 11:10:24 +01:00
|
|
|
|
|
|
|
---
|
2023-03-11 18:58:24 +01:00
|
|
|
# drone encrypt ResiLien/resilien $AWS_ACCESS_KEY_ID
|
2022-02-01 11:10:24 +01:00
|
|
|
kind: secret
|
2022-12-05 12:38:12 +01:00
|
|
|
name: PRODUCTION_AWS_ACCESS_KEY_ID
|
2023-03-11 18:58:24 +01:00
|
|
|
data: KgtvH9Sgp1fKS+IhgUGwqjK1Tk5tbb+4ViJZjnmxzDnQJ0Y6C4suTJjyh8SJgDoRiTq1uqNj
|
2022-12-05 12:38:12 +01:00
|
|
|
|
|
|
|
---
|
2023-03-11 18:58:24 +01:00
|
|
|
# drone encrypt ResiLien/resilien $AWS_SECRET_ACCESS_KEY
|
2022-12-05 12:38:12 +01:00
|
|
|
kind: secret
|
|
|
|
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
2023-03-11 18:58:24 +01:00
|
|
|
data: mTTax3N89MPu7JD83MP0izBvNcpeMmyyOplaNzazGp/8GBLO+oE1bz/5o1vLq2R3etIkl1cQ+JneJCIr3alPL+2bUVL5SvFC/s0RHDKcf3Zw/fUgBTiuq5DxZmk=
|
2022-02-01 11:10:24 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: prod
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install submodule
|
|
|
|
image: drone/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init
|
|
|
|
|
|
|
|
- name: install npm
|
|
|
|
image: node:current-alpine
|
2022-02-03 11:14:03 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
2022-02-01 11:10:24 +01:00
|
|
|
commands:
|
|
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
|
|
|
|
|
|
|
- name: build website
|
2022-12-05 12:38:12 +01:00
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
2022-02-01 11:10:24 +01:00
|
|
|
commands:
|
|
|
|
- hugo --minify --environment production
|
|
|
|
|
|
|
|
- name: typo
|
|
|
|
image: node:current-alpine
|
2022-02-03 11:14:03 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
2022-02-01 11:10:24 +01:00
|
|
|
commands:
|
|
|
|
- node themes/hugo-theme-lowtech/scripts/typo
|
|
|
|
|
2022-12-05 12:38:12 +01:00
|
|
|
- name: deploy
|
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
|
|
|
environment:
|
|
|
|
AWS_ACCESS_KEY_ID:
|
|
|
|
from_secret: PRODUCTION_AWS_ACCESS_KEY_ID
|
|
|
|
AWS_SECRET_ACCESS_KEY:
|
|
|
|
from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
|
|
|
commands:
|
|
|
|
- hugo deploy --environment production
|
2022-02-01 11:10:24 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
|
2022-02-03 11:14:03 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
host:
|
|
|
|
path: /tmp/drone/cache/resilien/resilien_fr/themes/hugo-theme-lowtech
|
|
|
|
|
2022-02-01 11:10:24 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: staging
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install submodule
|
|
|
|
image: drone/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init
|
|
|
|
|
|
|
|
- name: install npm
|
|
|
|
image: node:current-alpine
|
2022-02-03 11:14:03 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
2022-02-01 11:10:24 +01:00
|
|
|
commands:
|
|
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
|
|
|
|
|
|
|
- name: build website
|
2022-12-05 12:38:12 +01:00
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
2022-02-01 11:10:24 +01:00
|
|
|
commands:
|
|
|
|
- hugo --minify --buildDrafts --buildFuture --environment staging
|
|
|
|
|
|
|
|
- name: typo
|
|
|
|
image: node:current-alpine
|
2022-02-03 11:14:03 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
2022-02-01 11:10:24 +01:00
|
|
|
commands:
|
|
|
|
- node themes/hugo-theme-lowtech/scripts/typo
|
|
|
|
|
2022-12-05 12:38:12 +01:00
|
|
|
- name: deploy
|
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
|
|
|
environment:
|
|
|
|
AWS_ACCESS_KEY_ID:
|
|
|
|
from_secret: STAGING_AWS_ACCESS_KEY_ID
|
|
|
|
AWS_SECRET_ACCESS_KEY:
|
|
|
|
from_secret: STAGING_AWS_SECRET_ACCESS_KEY
|
|
|
|
commands:
|
|
|
|
- hugo deploy --environment staging
|
2022-02-01 11:10:24 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
2022-02-03 11:14:03 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
host:
|
|
|
|
path: /tmp/drone/cache/resilien/resilien_fr/themes/hugo-theme-lowtech
|