Remove old artefacts
This commit is contained in:
parent
0ea97e907e
commit
3d26e338e2
@ -1,80 +0,0 @@
|
||||
version: 2.1
|
||||
|
||||
jobs:
|
||||
build_assets:
|
||||
docker:
|
||||
- image: node:12-alpine
|
||||
environment:
|
||||
OUTPUT_DIR: ./output_prod/static
|
||||
steps:
|
||||
- checkout
|
||||
- run: npm ci
|
||||
- run: mkdir -p ${OUTPUT_DIR}
|
||||
- run: npm run-script build-prod
|
||||
- run: ls -la ${OUTPUT_DIR}
|
||||
- run: mkdir -p /tmp/workspace/static
|
||||
- run: cp -R ${OUTPUT_DIR}/* /tmp/workspace/static
|
||||
- persist_to_workspace:
|
||||
root: /tmp/workspace
|
||||
paths:
|
||||
- static/*
|
||||
|
||||
build_html:
|
||||
docker:
|
||||
- image: php:7.4-cli
|
||||
environment:
|
||||
APP_ENV: prod
|
||||
APP_URL: https://vakhrushev.me
|
||||
STATIC_DIR: ./output_prod/static
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
- checkout
|
||||
- run: docker/php/provision.sh
|
||||
- run: composer install --no-interaction --no-progress
|
||||
- run: mkdir -p ${STATIC_DIR}
|
||||
- run: cp -R /tmp/workspace/static/* ${STATIC_DIR}
|
||||
- run: |
|
||||
./vendor/bin/sculpin generate \
|
||||
--env="${APP_ENV}" \
|
||||
--url="${APP_URL}" \
|
||||
--no-interaction \
|
||||
-vv
|
||||
- run: mkdir -p /tmp/workspace/html
|
||||
- run: cp -R ./output_prod/* /tmp/workspace/html
|
||||
- persist_to_workspace:
|
||||
root: /tmp/workspace
|
||||
paths:
|
||||
- html/*
|
||||
|
||||
deploy:
|
||||
docker:
|
||||
- image: php:7.4-cli
|
||||
steps:
|
||||
- checkout
|
||||
- add_ssh_keys
|
||||
- run: apt-get update; apt-get install -yy openssh-client
|
||||
- run: ssh-keyscan "vakhrushev.me" >> ~/.ssh/known_hosts
|
||||
- run: docker/php/provision.sh
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
- run: mkdir -p ./output_prod
|
||||
- run: cp -R /tmp/workspace/html/* ./output_prod
|
||||
- run: ls -la ./output_prod
|
||||
- run: ls -la ./output_prod/static
|
||||
- run: dep deploy production -vv
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_deploy:
|
||||
jobs:
|
||||
- build_assets:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
- build_html:
|
||||
requires:
|
||||
- build_assets
|
||||
- deploy:
|
||||
requires:
|
||||
- build_html
|
@ -6,10 +6,7 @@ insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.{html,twig,yml,xml}]
|
||||
indent_size = 2
|
||||
|
||||
[gulpfile.js]
|
||||
[*.{html,twig,yml,yaml,xml}]
|
||||
indent_size = 2
|
||||
|
||||
[package.json]
|
||||
|
2
Makefile
2
Makefile
@ -43,5 +43,3 @@ watch: clean build-assets
|
||||
deploy: build-prod
|
||||
invoke deploy
|
||||
|
||||
rollback:
|
||||
./tools/dep rollback production -vv
|
||||
|
Loading…
Reference in New Issue
Block a user