2024-04-08 09:34:47 -04:00
|
|
|
name: Deploy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-04-08 13:56:07 -04:00
|
|
|
branches: [ main ]
|
2024-04-08 09:34:47 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: /workspace/SPT-AKI/DB-Website
|
2024-04-08 10:30:08 -04:00
|
|
|
|
2024-04-08 13:56:07 -04:00
|
|
|
- name: List files
|
2024-04-08 10:30:08 -04:00
|
|
|
run: ls -lah
|
2024-04-08 09:34:47 -04:00
|
|
|
shell: bash
|
2024-04-08 10:30:08 -04:00
|
|
|
with:
|
|
|
|
path: /workspace/SPT-AKI/DB-Website
|
2024-04-08 13:56:07 -04:00
|
|
|
|
|
|
|
- name: Set up SSH key
|
|
|
|
uses: webfactory/ssh-agent@v0.9.0
|
|
|
|
with:
|
|
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
|
|
|
|
- name: Push to production
|
|
|
|
run: |
|
|
|
|
git remote add deploy ssh://dbwebsite@51.195.101.201/home/dbwebsite/DB-Website.git
|
|
|
|
git push deploy main:main
|