A Github action to sync content to a remote server.
| Option | Description | Type | Default | |
|---|---|---|---|---|
host |
The server host. | string | required |
|
port |
The server port. | number | required |
|
username |
Username for authentication. | string | required |
|
password |
Password for user authentication. | string | required |
|
local-directory |
The local directory where files to be pushed are located.. | string | required |
|
remote-directory |
The remote directory in server where files will be pushed. | string | required |
|
remove-content |
Boolean to remove the existing content in destination directory. Be careful using this option together with a wrong destination directory. | boolean | False |
- name: Deploy React build
uses: sergiogc9/github-action-sync-ssh@latest
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
local-directory: './build'
remote-directory: '/home/user/web/react/'To create a new version follow these steps:
- Update and commit code.
- Create a new build using
yarn buildand commit thedistfolder. - Update version in package.json and commit with name as
Release VERSION. - Create a new version tag using
git tag VERSION. - Set created tag as
latesttag usinggit tag -f latest. - Push tags with
git push --tags --force. - Create a release using the github page.
Built using node-ssh.