~crocmagnon/blog

ref: f6d6d7b850df58a2f5ce8e8555f9b0328462224d blog/.build.yml -rw-r--r-- 979 bytes
f6d6d7b8Gabriel Augendre Add task to notify commenters once their comment has been moderated. 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
image: archlinux
packages:
  - docker
  - python-pip
  - python-virtualenv
sources:
  - https://git.sr.ht/~crocmagnon/blog
secrets:
  - 2da6ddc6-3d12-4306-a1e4-8268c6194386
  - 29bc352f-0807-46e9-a4ef-2f869f94afa3
  - 5c948915-48c2-4542-8fc1-a5676f4d7126
environment:
  TESTING: true
tasks:
  - test: |
      python --version
      cd blog
      virtualenv venv
      venv/bin/python -m pip install -r requirements.txt -r requirements-dev.txt --progress-bar off
      venv/bin/python -m pytest
  - setup_docker: |
      ./blog/docker/setup-docker
  - build: |
      docker info
      docker login -u crocmagnon --password-stdin < .docker-secret
      docker pull crocmagnon/blog || true
      docker build --cache-from crocmagnon/blog:latest -t crocmagnon/blog blog/
      docker push crocmagnon/blog
  - deploy: |
      ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy"
triggers:
  - action: email
    condition: failure
    to: Gabriel Augendre <gabriel@augendre.info>