Skip to content

Commit

Permalink
Using rsync to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
pedelgado authored May 6, 2024
1 parent f143f5b commit b70dadf
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,36 @@ permissions:
jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
id: build-files
run: composer install --prefer-dist --no-progress
- name: Install dependencies
id: build-files
run: composer install --prefer-dist --no-progress

deploy:

runs-on: ubuntu-latest

steps:
- name: Copy result in server
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
uses: burnett01/rsync-deployments@7.0.1
with:
server: ${{ secrets.OCEBOT_HOST }}
username: ${{ secrets.OCEBOT_HOST_USER }}
password: ${{ secrets.OCEBOT_HOST_PASS }}
port: ${{ secrets.OCEBOT_HOST_PORT }}
sftp_only: true
local_path: ${{ $GITHUB_WORKSPACE }}
switches: -avzr --delete
path: ./
remote_path: ${{ secrets.KT_HOST_PATH }}
remote_host: ${{ secrets.OCEBOT_HOST }}
remote_user: ${{ secrets.OCEBOT_HOST_USER }}
remote_key: ${{ secrets.OCEBOT_PRIVATE_SSH_KEY }}

0 comments on commit b70dadf

Please sign in to comment.