~reesmichael1/chantpointer

ref: e98e6acba77bf927f14ade83673227e844055991 chantpointer/.build.yml -rw-r--r-- 1.0 KiB View raw
e98e6acbMichael Rees Re-write frontend using Tailwind CSS 5 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
35
image: archlinux
packages:
    - go
    - npm
    - rsync
sources:
    - https://git.sr.ht/~reesmichael1/chantpointer
secrets:
    - 5c21e93c-6d8e-410a-9ae4-35dcc51acd8c
    - b2db3c75-f665-474d-a8d7-134c4abb0246
    - ab5d9fdb-0e9d-4b4a-ade1-6c591ac6556b
tasks:
    - check-branch: | 
       cd chantpointer
       if [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ]; then
          complete-build;
       fi
    - test: |
        cd chantpointer
        go test
    - build-server: |
        cd chantpointer
        go build -o bin/server
    - build-css: |
        cd chantpointer
        npm install tailwindcss
        npx tailwind build css/tailwind.css -o static/style.css
        npm install purgecss
        npx purgecss -c purgecss.config.js -o static
    - deploy: |
        cd chantpointer
        rsync -r bin chantpointer:/home/chantpointer/deploy
        rsync -r static chantpointer:/home/chantpointer/deploy
        rsync -r templates chantpointer:/home/chantpointer/deploy
        ssh chantpointer "sudo systemctl restart chantpointer"