Skip to content

first deployment via CICD 4 #3

first deployment via CICD 4

first deployment via CICD 4 #3

Workflow file for this run

# Name of the workflow
name: Deploy to Server
# Trigger the workflow on push to the main branch
on:
push:
branches:
- rcx
# 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