Skip to content

Commit

Permalink
Update CD..yml
Browse files Browse the repository at this point in the history
  • Loading branch information
code-wolf-byte committed Aug 31, 2024
1 parent 81f66de commit f9b27d7
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/CD..yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,17 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
environment: CI/CD # Specify the environment here

steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Copy repository contents via SCP
uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
with:
source: "."
target: "/var/www/mywebsite" # Update target as necessary
environment: CI/CD # Specify the environment if using GitHub Environments

- name: Executing remote command
steps:
- name: Execute remote deployment script
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSHKEY }}
script: sudo /root/asu-soda-newsite/CD.sh
script: |
sudo /root/asu-soda-newsite/CD.sh

0 comments on commit f9b27d7

Please sign in to comment.