tweak: scripts

This commit is contained in:
nikomiko 2026-02-05 22:05:33 -05:00 committed by Sheldon Cooper
parent 9a82885483
commit 04904c32cb
3 changed files with 37 additions and 8 deletions

View file

@ -1,9 +1,6 @@
name: SSH Deploy Staged
name: SSH Deploy to production
on:
push:
branches:
- main
on: workflow_dispatch
jobs:
remote-update:
@ -20,4 +17,4 @@ jobs:
- name: SSH and run deployment script
run: |
ssh -i ~/.ssh/id_ed25519 ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \
'sh ./stage.sh'
'sh "${{ secrets.SOURCE_PATH }}"/deploy.sh "${{ secrets.SOURCE_PATH }}" "${{ secrets.STATIC_PATH }}" "${{ secrets.BACKEND_PATH }}"'

23
.github/workflows/ssh-stage.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: SSH Deploy to staging
on:
push:
branches:
- main
jobs:
remote-update:
runs-on: ubuntu-latest
steps:
- name: Load SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: SSH and run staging script
run: |
ssh -i ~/.ssh/id_ed25519 ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \
'sh "${{ secrets.SOURCE_PATH }}"/stage.sh "${{ secrets.SOURCE_PATH }}"'