~fmac/fmac.xyz-website

f525758a7b1c867896d7d0852ff96b8ff51226f6 — Francesco Camuffo a month ago 862b7ee master
Deploy also to my server
1 files changed, 14 insertions(+), 0 deletions(-)

M .build.yml
M .build.yml => .build.yml +14 -0
@@ 1,13 1,27 @@
image: alpine/latest
packages:
  - hugo
  - rsync
oauth: pages.sr.ht/PAGES:RW
environment:
  remote: deploy@mirror.fmac.xyz
  site: fmac.xyz
secrets:
  - 6979480e-4623-4962-aef5-fea35dbd7f04 # ssh deploy key
triggers:
  - action: email
    condition: always
    to: Francesco Camuffo <dev@fmac.xyz>
tasks:
- package: |
    cd fmac.xyz-website
    hugo
    tar -C public -cvz . > ../site.tar.gz
- upload: |
    # deploy to srht pages
    acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz

    # deploy to my server
    cd fmac.xyz-website
    echo "StrictHostKeyChecking=no" >> ~/.ssh/config
    rsync -rP public/ "$remote":/var/www/fmac.xyz/