No description
All checks were successful
Continuous Integration / Test rsync is not installed (push) Successful in 4s
Continuous Integration / Test empty files (push) Successful in 17s
Continuous Integration / Test default remote path (push) Successful in 13s
Continuous Integration / Test file doesn't exist (push) Successful in 16s
Continuous Integration / Test custom remote path (push) Successful in 14s
Continuous Integration / Test custom remote command (push) Successful in 13s
Continuous Integration / Cleanup (push) Successful in 2s
|
||
---|---|---|
.forgejo/workflows | ||
action.yml | ||
compose.yml | ||
deploy.code-workspace | ||
LICENSE | ||
README.md |
deploy
Copy files to a remote host using rsync and deploy using Docker Compose.
Inputs
parameter | description | default |
---|---|---|
files |
Files to copy (required) | |
ssh_user |
SSH user (required) | |
ssh_host |
SSH host (required) | |
ssh_port |
SSH port | "22" |
remote_path |
Remote path to deploy to | "/home/${{ inputs.ssh_user }}/${{ github.repository }}" |
deploy_command |
Deploy command | "docker compose up --build --remove-orphans -d" |
Example
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://git.hicham.party/actions/apt-upgrade-install@v1
with:
packages: rsync
- uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: https://git.hicham.party/actions/apt-upgrade-install@v1
with:
ssh_user: ${{ secrets.HOST_USER }}
ssh_host: ${{ secrets.HOST }}
ssh_port: ${{ secrets.HOST_SSH_PORT }}
files: "compose.yml .env"