tweak: scripts
This commit is contained in:
parent
9a82885483
commit
04904c32cb
3 changed files with 37 additions and 8 deletions
9
.github/workflows/ssh-deploy.yml
vendored
9
.github/workflows/ssh-deploy.yml
vendored
|
|
@ -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
23
.github/workflows/ssh-stage.yml
vendored
Normal 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 }}"'
|
||||
Loading…
Add table
Add a link
Reference in a new issue