Remove old artefacts

This commit is contained in:
Anton Vakhrushev 2024-12-25 11:54:08 +03:00
parent 0ea97e907e
commit 3d26e338e2
Signed by: av
GPG Key ID: F5BF52FC352E255A
5 changed files with 5 additions and 93 deletions

View File

@ -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

View File

@ -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]

3
.env
View File

@ -1,3 +0,0 @@
PROJECT=homepage
PHP_IMAGE=homepage-php
NODE_IMAGE=homepage-node

View File

@ -43,5 +43,3 @@ watch: clean build-assets
deploy: build-prod
invoke deploy
rollback:
./tools/dep rollback production -vv

View File

@ -1,10 +1,10 @@
Source for [vakhrushev.me](http://vakhrushev.me).
Source for [vakhrushev.me](https://vakhrushev.me).
Build:
make build-docker
make build
task build-docker
task build
Deploy:
make deploy
task deploy