GitHub Action for Deployer
Go to file
Andrei Ioniță 9eab20634f
Mark job as failed on error (#14)
* fix: set failed on subprocess error

* chore: update dependencies
2021-06-20 10:35:43 +03:00
node_modules Mark job as failed on error (#14) 2021-06-20 10:35:43 +03:00
action.yaml Add ssh-config input (#11) 2021-05-01 11:32:31 +02:00
index.js Mark job as failed on error (#14) 2021-06-20 10:35:43 +03:00
LICENSE Add action 2020-11-10 23:03:10 +01:00
package-lock.json Mark job as failed on error (#14) 2021-06-20 10:35:43 +03:00
package.json Mark job as failed on error (#14) 2021-06-20 10:35:43 +03:00
README.md Add ssh-config input (#11) 2021-05-01 11:32:31 +02:00

GitHub Action for Deployer

  - name: Deploy
    uses: deployphp/action@master
    with:
      private-key: ${{ secrets.PRIVATE_KEY }}
      known-hosts: ${{ secrets.KNOWN_HOSTS }}
      ssh-config: ${{ secrets.SSH_CONFIG }}
      dep: deploy prod -v

Inputs

  • private-key - Required. A private key to accessing servers.
  • known-hosts - Optional. Host fingerprints. If omitted StrictHostKeyChecking=no will be used unless ssh-config is provided.
  • ssh-config - Optional. SSH configuration.
  • dep - Required. Arguments to pass to Deployer command.

Deployer version

First, the action will check for Deployer bin at those paths:

  • vendor/bin/dep
  • bin/dep
  • deployer.phar

If bin not found, phar version will be downloaded.

Example

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
    with:
      private-key: ${{ secrets.PRIVATE_KEY }}
      known-hosts: ${{ secrets.KNOWN_HOSTS }}
      ssh-config: ${{ secrets.SSH_CONFIG }}
      dep: deploy prod -v