Skip to content

ip updating

ip updating #18

Workflow file for this run

name: Deploy to Ubuntu Server1
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Ubuntu Server
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: appleboy/ssh-action@v1.0.0
- name: Create Tar Archive
run: tar -czf deploy.tar.gz .
- name: Copy Tar Archive to Ubuntu Server
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.IP }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
scp -o StrictHostKeyChecking=no deploy.tar.gz ${{ secrets.USERNAME }}@${{ secrets.IP }}:/home
- name: Extract Tar Archive on Ubuntu Server
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.IP }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd /home
tar -xzf deploy.tar.gz