-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (21 loc) · 1 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Deploy to DigitalOcean Droplet
on:
push:
branches:
- main # or any other branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository # This step is required to access the repository files
uses: actions/checkout@v4 # This action checks out your repository files to the runner
- name: Copy repository files to the droplet # This step copies the repository files to the droplet
uses: appleboy/scp-action@master # This action copies files to a remote server over SSH
with:
host: ${{ secrets.DROPLET_IP }} # Your droplet IP address
username: root # or your droplet username
key: ${{ secrets.SSH_PRIVATE_KEY }} # Your SSH private key
passphrase: ${{ secrets.SSH_PASSPHRASE }} # Your SSH passphrase
port: 22 # or your SSH port if changed
source: "." # Copies the whole repo, specify subdirectories or files if needed
target: "/var/www/html" # Target directory on your droplet