anubis.mgk.one/.forgejo/workflows/deploy.yaml
Melkor f105505d60
All checks were successful
/ deploy (push) Successful in 31s
Initial commit.
2024-07-07 04:05:38 -04:00

44 lines
1.7 KiB
YAML

on: [push]
jobs:
deploy:
runs-on: barad-dur
steps:
- name: Deploy to anubis.mgk.one
run: echo "Deploying to anubis.mgk.one!"
- name: Update git repo on webserver
run: |
echo "Updating git repo on webserver."
git -C /srv/sites/anubis.mgk.one/git pull
- name: Running project setup for theme hugoplate
run: |
echo "Running project setup for theme hugoplate."
ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "cd /srv/sites/anubis.mgk.one/git && npm run project-setup"
- name: Install all npm dependencies
run: |
echo "Install all npm dependencies."
ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "cd /srv/sites/anubis.mgk.one/git && npm install"
- name: Run update theme script in hugoplate
run: |
echo "Run update theme script in hugoplate."
ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "cd /srv/sites/anubis.mgk.one/git && npm run update-theme"
- name: Run hugoplate update-modules
run: |
echo "Run hugoplate update-modules."
ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "cd /srv/sites/anubis.mgk.one/git && npm run update-modules"
- name: Compiling hugo site
run: |
echo "Compiling hugo site."
ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "cd /srv/sites/anubis.mgk.one/git && npm run build"
- name: Using rsync to copy over the new website from the webserver's git repo
run: |
echo "Using rsync to copy over the new website from the webserver's git repo."
rsync -av --delete /srv/sites/anubis.mgk.one/git/public/* /srv/sites/anubis.mgk.one/public_html/