Skip to content

Deploy to Nest

Deploy to Nest #467

Workflow file for this run

name: "Deploy to Nest"
on:
push:
branches:
- 'main'
workflow_run:
workflows: ["Update database"]
types:
- completed
workflow_dispatch:
jobs:
deploy-to-nest:
runs-on: ubuntu-latest
steps:
- name: Connect to ssh, pull and systemctl restart
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
: # Load nix binaries
export PATH=/home/mengshin/.nix-profile/bin:$PATH
export PATH=/nix/var/nix/profiles/default/bin:$PATH
cd /home/mengshin/pub/study
git pull
systemctl --user restart news.service