inclusive-design / rsync-deploy

Deploy content to a remote server using rsync.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rsync Deploy

This GitHub Action deploys content to a remote server using rsync. It's a fork of Pendect/action-rsyncer which adds support for custom SSH ports.

Usage

Add an SSH public key to the server.

Add the corresponding private key to the repository as an encrypted secret named DEPLOY_KEY.

In .github/workflows/<your-workflow-name>.yml, add the following steps (note: src is relative to $GITHUB_WORKSPACE):

- name: Deploy to server
  id: deploy
  uses: platform-coop-toolkit/rsync-deploy@master
  env:
    DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
  with:
    flags: '-azrh --delete' # rsync flags (default: '-azrh')
    port: '22' # SSH port (default: 22)
    src: 'build/' # Local path to deploy, relative to $GITHUB_WORKSPACE (default: '')
    dest: 'user@example.com:/var/www/example.com'

- name: Display deployment status
  run: echo "${{ steps.deploy.outputs.status }}"

About

Deploy content to a remote server using rsync.

License:Other


Languages

Language:Shell 52.8%Language:Dockerfile 47.2%