Skip to content

Commit

Permalink
Enable deployment in CI for every commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Skrypnyk committed May 1, 2022
1 parent 278309f commit e660c3b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ aliases:
DEPLOY_SSH_FINGERPRINT: *deploy_ssh_fingerprint

- &step_setup_git
run: |
mkdir -p "${HOME}/.ssh/"
echo -e "Host *\n\tStrictHostKeyChecking no\n" > "${HOME}/.ssh/config"
DEPLOY_SSH_FILE="${DEPLOY_SSH_FINGERPRINT//:}"
DEPLOY_SSH_FILE="${HOME}/.ssh/id_rsa_${DEPLOY_SSH_FILE//\"}"
if [ -f "${DEPLOY_SSH_FILE}" ]; then
run:
name: Setup git
command: |
mkdir -p "${HOME}/.ssh/"
echo -e "Host *\n\tStrictHostKeyChecking no\n" > "${HOME}/.ssh/config"
DEPLOY_SSH_FILE="${DEPLOY_SSH_FINGERPRINT//:}"
DEPLOY_SSH_FILE="${HOME}/.ssh/id_rsa_${DEPLOY_SSH_FILE//\"}"
if [ -f "${DEPLOY_SSH_FILE}" ]; then
echo "Found Deploy SSH key file ${DEPLOY_SSH_FILE}"
ssh-add -D > /dev/null
ssh-add "${DEPLOY_SSH_FILE}"
fi
git config --global user.name "$DEPLOY_USER_NAME"
git config --global user.email "$DEPLOY_USER_EMAIL"
fi
git config --global user.name "$DEPLOY_USER_NAME"
git config --global user.email "$DEPLOY_USER_EMAIL"
jobs:
build:
Expand Down Expand Up @@ -55,7 +57,7 @@ jobs:
- *step_setup_git
- checkout
- run:
name: Planting test asset file.
name: Create test asset file.
command: touch test-file-$(date "+%Y%m%d-%H%M%S").txt
- run:
name: Demonstration of deployment in 'force-push' mode.
Expand Down Expand Up @@ -88,6 +90,3 @@ workflows:
- deploy:
requires:
- build
filters:
branches:
only: master
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ insert_final_newline = true
[composer.{json,lock}]
indent_size = 4

[*.yml]
indent_size = 2

[*.xml]
indent_size = 4

0 comments on commit e660c3b

Please sign in to comment.