Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
ist CICD deployment
  • Loading branch information
itsrcx authored Jun 1, 2024
1 parent ddcd91e commit 981652b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Name of the workflow
name: Deploy to Server

# Trigger the workflow on push to the main branch
on:
push:
branches:
- main

# Define the jobs to run
jobs:
deploy:
# Use the latest Ubuntu runner
runs-on: ubuntu-latest

steps:
# Check out the code from the repository
- name: Check out the code
uses: actions/checkout@v2

# Set up SSH agent to access the server
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

# Run the deployment script on the server
- name: Deploy to server
run: ssh [email protected] 'bash -s' < /var/www/deploy.sh

0 comments on commit 981652b

Please sign in to comment.