Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work with GitHub Workflows v2 format #7

wants to merge 4 commits into
base: master


Copy link

oncletom commented Oct 25, 2019

Sample config:

name: Deploy to production

      - master

    runs-on: ubuntu-latest
      - uses: actions/checkout@master
      - uses: contention/rsync-deployments@master
          DEST: /path/to/target
          SRC: public/
          RSYNC_OPTIONS: -avzr --delete --exclude node_modules --exclude '.git*'
          DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

It accepts 3 arguments:

  • USER_AND_HOST (mandatory): remote hostname and user (à la user@host.tld)
  • DEST (mandatory): remote host destination path
  • SRC (optional): blank by default (so to say, $GITHUB_WORKSPACE/$SRC) — useful when something has been generated in a subfolder in a previous action (eg: _site/ or public/ with static site generators like Jekyll or Hugo);
  • RSYNC_OPTIONS (optional): additional options to pass to the rsync command;

This comment has been minimized.

Copy link

contention commented Oct 25, 2019

Cool - appreciate it.

This has been on my todo list for... well... forever, and I’d actually planned to look at it this weekend, so really good timing. :o)


This comment has been minimized.

Copy link

oncletom commented Oct 26, 2019


I did change only the minimum, without rethinking the use of the action with the v2 syntax. GitHub droped the array-like arguments, making it difficult to use $1 & co args.

Feel free to revisit these changes 👍

Thanks for publishing this action in the first place!


This comment has been minimized.

Copy link

rchrd2 commented Oct 28, 2019

This fork worked for me. The code in the repo did not.

oncletom added 3 commits Dec 23, 2019

This comment has been minimized.

Copy link

oncletom commented Jan 17, 2020

I have updated the PR with an up to date README, reworked arguments and an additional one—to select the subfolder of the Github Action Workspace; I needed this to deploy the output of a Hugo website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.