Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/php-actions/deploy-ssh
Deploy your application via SSH.
https://github.com/php-actions/deploy-ssh
Last synced: about 1 month ago
JSON representation
Deploy your application via SSH.
- Host: GitHub
- URL: https://github.com/php-actions/deploy-ssh
- Owner: php-actions
- Created: 2022-11-29T13:11:40.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T20:37:06.000Z (about 2 years ago)
- Last Synced: 2024-10-17T23:12:55.283Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
Deploy your application via SSH.
================================> **THIS IS CURRENTLY WORK IN PROGRESS** - once v1 is released there will be no more major changes.
After a successful test run, this action can copy the project's files via SSH to another server, which could be an in-place deployment, or a fresh server that's set up for each deployment.
An example repository has been created at https://github.com/php-actions/example-deploy-ssh to show how to use this action in development and production projects.
Usage
-----Create your Github Workflow configuration in `.github/workflows/ci.yml` or similar.
```yml
name: CIon: [push]
jobs:
build:
runs-on: ubuntu-lateststeps:
# Load the pre-build project files:
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
# Then deploy to your server of choice
- uses: php-actions/deploy
with:
hostname: deploy.example.com
user: webdeploy
path: /var/www/example.com
ssh_key: {{ secrets.deploy_ssh_key }}
```To generate an SSH key pair (private and public) using the RSA algorithm, `ssh-keygen -t rsa -b 4096 -C "deploy@github-acions"`. To convert a key pair into PEM format, `ssh-keygen -f actions_rsa -e -m pem` - then paste the contents of the generated PEM file into your project's Github Secrets.
// TODO: Document post-transfer script, how it might need adding to sudoers if sudo is required.