Update README.md #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |