File tree Expand file tree Collapse file tree 1 file changed +1
-24
lines changed
Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- workflow_dispatch :
54 release :
65 types : [published]
6+ workflow_dispatch :
77
88jobs :
99 build-and-push-image :
3636 push : true
3737 tags : ${{ steps.meta.outputs.tags }}
3838 labels : ${{ steps.meta.outputs.labels }}
39- deploy :
40- name : Deploy
41- runs-on : ubuntu-latest
42- environment : deployment
43- env :
44- SSH_AUTH_SOCK : /tmp/ssh_agent.sock
45- steps :
46- - name : Checkout repository
47- uses : actions/checkout@v3
48- - name : Setup SSH key
49- run : |
50- ssh-agent -t 60 -a $SSH_AUTH_SOCK > /dev/null
51- ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
52- - name : Setup known hosts
53- run : mkdir -p ~/.ssh && chmod 700 ~/.ssh && ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
54- - name : Setup SSH config
55- run : |
56- mkdir -p ~/.ssh/sockets && chmod 700 ~/.ssh/sockets
57- echo "Host *\n User ${{ secrets.SSH_USER }}\n ForwardAgent yes\n ControlMaster auto\n ControlPath ~/.ssh/sockets/%r@%h-%p\n ControlPersist 600" >> ~/.ssh/config
58- chmod 600 ~/.ssh/config
59- - name : Deploy
60- run : |
61- ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -o SendEnv=GITHUB_REF_NAME "cd /srv/nostr-ts-relay && git fetch -va origin && git checkout --progress --force -B $GITHUB_REF_NAME refs/remotes/origin/$GITHUB_REF_NAME && source ~/.nvm/nvm.sh && nvm use && npm run tor:docker:compose:start -- --detach"
You can’t perform that action at this time.
0 commit comments