image: freebsd/12.x
packages:
- python39
- py39-sqlite3
- jpeg-turbo
- py37-ansible
sources:
- https://git.sr.ht/~crocmagnon/blog
secrets:
- ea931da1-9acd-47b0-b6c9-52b8b61c4647 # Ansible hosts file
- 5c948915-48c2-4542-8fc1-a5676f4d7126 # Deploy SSH key
environment:
POETRY_VERSION: 1.1.4
tasks:
- install_poetry: |
mkdir $HOME/bin
ln -s $(which python3.9) $HOME/bin/python
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
echo "source $HOME/.poetry/env" >> ~/.buildenv
- install_deps: |
cd blog
poetry install -n
- test: |
poetry run ./docker/runtests.sh
- check-branch: |
if [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ]; then \
complete-build; \
fi
- deploy: |
ansible-playbook -i ~/ansiblehosts --ssh-common-args "-o StrictHostKeyChecking=no" blog/ansible/playbook.yml
triggers:
- action: email
condition: failure
to: Gabriel Augendre <gabriel@augendre.info>