2
0
mirror of https://github.com/offen/website.git synced 2024-11-25 02:10:26 +01:00
website/.circleci/config.yml

45 lines
1.4 KiB
YAML
Raw Normal View History

2019-04-10 18:17:24 +02:00
version: 2
2019-04-11 15:48:36 +02:00
2019-04-10 18:17:24 +02:00
jobs:
deploy:
2019-07-25 16:14:37 +02:00
docker:
- image: circleci/python:3.7
2019-09-09 20:01:22 +02:00
working_directory: ~/offen
2019-07-25 16:14:37 +02:00
steps:
2019-09-09 20:01:22 +02:00
- checkout
- setup_remote_docker
2019-07-25 16:14:37 +02:00
- run:
name: Install deployment dependencies
2019-07-25 16:14:37 +02:00
command: |
sudo pip install -q awscli --upgrade
- run:
name: Build and deploy to S3
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
export SITEURL="https://www.offen.dev"
export BUCKET="offen-dev-production"
export DISTRIBUTION="E2UP8XHLFOC3QC"
export ROBOTS_FILE="robots.txt.production"
2020-01-12 19:03:33 +01:00
export OFFEN_ACCOUNT_ID="5ec8345a-2a45-4eb9-92e5-8d9e5684db58"
else
export SITEURL="https://staging.offen.dev"
export BUCKET="offen-dev-staging"
export DISTRIBUTION="E13I20LK8ASYFH"
export ROBOTS_FILE="robots.txt.staging"
2020-01-08 15:53:08 +01:00
export OFFEN_ACCOUNT_ID="8f7ee44a-4cd8-47f2-a77e-8c7c98d46b89"
fi
make build
aws s3 sync --delete ./output/. s3://$BUCKET
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION --paths "/*"
2019-07-25 16:14:37 +02:00
2019-04-11 15:48:36 +02:00
workflows:
version: 2
2019-10-08 19:46:02 +02:00
build_deploy:
2019-04-11 15:48:36 +02:00
jobs:
2019-09-09 20:01:22 +02:00
- deploy:
filters:
branches:
only:
- master
- development