Update push.yml
This commit is contained in:
parent
70af0cfc23
commit
9e123b1124
1 changed files with 25 additions and 4 deletions
29
.github/workflows/push.yml
vendored
29
.github/workflows/push.yml
vendored
|
|
@ -11,9 +11,30 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
||||
name: SSH Deployment
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
TEMP=$(mktemp)
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > $TEMP
|
||||
ssh -o 'StrictHostKeyChecking no' -i $TEMP mattthetekie@venith.net 'bash -s' < "mkdir /var/www/venith && rm -rf /var/www/venith && cd /var/www/ && git clone https://github.com/VenithNET/VENITH.NET/ && mv VENITH.NET venith"
|
||||
cd ${{ github.workspace }}
|
||||
ssh-keyscan -t rsa ${{ secrets.IP }} >> ~/.ssh/known_hosts
|
||||
ssh ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} "cd /var/www/ & rm -rf venith & git clone https://github.com/VenithNET/VENITH.NET/ & mv VENITH.NET venith"
|
||||
echo "Successfully pulled repo."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue