~fabrixxm/sito

ref: gl98 sito/.build.yml -rw-r--r-- 1.0 KiB
5cffd8b6 — fabrixxm Win98 theme 2 years 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
36
37
image: archlinux
packages:
  - python
  - python-pip
  - nodejs
  - npm
  - rsync
sources:
  - https://git.sr.ht/~fabrixxm/sito
environment:
  deploy: deploy@gl-como.it
  remotefolder: /home/glcomo/html/gl-como.it/v2015
  sshopts: ssh -o StrictHostKeyChecking=no -p 1113
  rsyncopts: --group --owner --chown=deploy:sito -rP
secrets:
  -  3c45bf76-45cf-4423-9c58-d264f023578d
tasks:
  - setup: |
      npm install sass
      cd sito
      python3 -m venv pythonvenv
      . pythonvenv/bin/activate
      pip install -r requirements.txt
  - build: |
      cd sito
      . pythonvenv/bin/activate
      PAHT=$PATH:~/node_modules/.bin/
      make publish
      # if not on master branch skip the next stages
      if [ "$(git rev-parse origin/master)" != "$(git rev-parse HEAD)" ]; then \
        complete-build; \
      fi
  - deploy: |
      cd sito
      rsync --rsh="$sshopts" $rsyncopts output/ deploy@gl-como.it:$remotefolder/
      $sshopts deploy@gl-como.it find $remotefolder -exec "chmod g+w {} \;"
      $sshopts deploy@gl-como.it chown -R :sito $remotefolder