deployphp/README.md

49 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2020-11-11 01:10:29 +00:00
# GitHub Action for Deployer
2020-11-10 22:49:10 +00:00
2020-11-13 20:47:43 +00:00
```yaml
- name: Deploy
uses: deployphp/action@master
2020-11-13 20:47:43 +00:00
with:
private-key: ${{ secrets.PRIVATE_KEY }}
known-hosts: ${{ secrets.KNOWN_HOSTS }}
2021-05-01 09:32:31 +00:00
ssh-config: ${{ secrets.SSH_CONFIG }}
2020-11-13 20:47:43 +00:00
dep: deploy prod -v
```
2020-11-13 20:45:33 +00:00
2020-11-13 20:47:43 +00:00
## Inputs
2020-11-13 20:45:33 +00:00
2020-11-13 20:47:43 +00:00
- `private-key` - Required. A private key to accessing servers.
2021-05-01 09:32:31 +00:00
- `known-hosts` - Optional. Host fingerprints. If omitted `StrictHostKeyChecking=no` will be used unless `ssh-config` is provided.
- `ssh-config` - Optional. SSH configuration.
2020-11-13 20:47:43 +00:00
- `dep` - Required. Arguments to pass to Deployer command.
2020-11-13 20:45:33 +00:00
## Deployer version
First, the action will check for Deployer bin at those paths:
- `vendor/bin/dep`
- `bin/dep`
- `deployer.phar`
2020-11-13 20:46:12 +00:00
2020-11-13 20:45:33 +00:00
If bin not found, phar version will be downloaded.
2020-11-10 22:49:10 +00:00
## Example
```yaml
deploy:
name: Deploy to prod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 7.4
- name: Deploy
uses: deployphp/action@master
2020-11-10 22:49:10 +00:00
with:
private-key: ${{ secrets.PRIVATE_KEY }}
known-hosts: ${{ secrets.KNOWN_HOSTS }}
2021-05-01 09:32:31 +00:00
ssh-config: ${{ secrets.SSH_CONFIG }}
2020-11-10 22:49:10 +00:00
dep: deploy prod -v
```