~allie/website-2020 unlisted

website-2020/.build.yml -rw-r--r-- 992 bytes View raw
05c65b0eAlfie Pates publish reflect 2019 3 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
image: debian/stable
packages:
        - pipenv
        - rsync
sources:
        - https://git.sr.ht/~allie/website-2020
environment:
        deploy_user: srhtdeploy
        deploy_host: alfiepates.me
        deploy_dir: "/srv/website2020"
secrets: 
        - 8984d557-7dd0-46d6-a473-0ad372213397
tasks: 
        - setup: | 
                cd website-2020
                pipenv install
        - build: |
                cd website-2020
                pipenv run make publish
        - deploy: |
                cd website-2020
                # Let's only do this if we're on master
                if [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ]; then \
                        echo "Skipping, we're not on master"; complete-build; \
                fi
                echo "We're on master, deploying" 
                sshopts="ssh -o StrictHostKeyChecking=no"
                rsync --rsh="$sshopts" -r --quiet --delete-after output/* $deploy_user@$deploy_host:$deploy_dir