GitHub Action for Deployer
Go to file
2022-03-19 16:53:53 +01:00
node_modules Update action 2021-10-15 22:41:54 +02:00
action.yaml Add deployer-binary input 2021-10-21 22:08:17 +02:00
index.js Use --no-interaction by default (#34) 2022-03-19 16:53:53 +01:00
LICENSE Update action 2021-10-15 22:41:21 +02:00
package-lock.json Update action 2021-10-15 22:41:21 +02:00
package.json Update action 2021-10-15 22:41:21 +02:00
README.md Add deployer-binary input 2021-10-21 22:08:17 +02:00

GitHub Action for Deployer

  - name: Deploy
    uses: deployphp/action@v1
    with:
      private-key: ${{ secrets.PRIVATE_KEY }}
      dep: deploy

Inputs

  - name: Deploy
    uses: deployphp/action@v1
    with:
      # Private key for connecting to remote hosts. To generate private key:
      # `ssh-keygen -o -t rsa -C 'action@deployer.org'`.
      # Required.
      private-key: ${{ secrets.PRIVATE_KEY }}

      # The deployer task to run. For example:
      # `deploy all`.
      # Required.
      dep: deploy

      # Content of `~/.ssh/known_hosts` file. The public SSH keys for a
      # host may be obtained using the utility `ssh-keyscan`. 
      # For example: `ssh-keyscan deployer.org`.
      # If known-hosts omitted, `StrictHostKeyChecking no` will be added to
      # `ssh_config`.
      # Optional.
      known-hosts: |
        ...        

      # The SSH configuration. Content of `~/.ssh/config` file.
      # Optional.
      ssh-config: |
        ...        
    
      # Deployer version to download from deployer.org.
      # First, the action will check for Deployer binary at those paths:
      # - `vendor/bin/dep`
      # - `deployer.phar`
      # If the binary not found, phar version will be downloaded from
      # deployer.org.
      # Optional.
      deployer-version: "7.0.0"

      # You can specify path to your local Deployer binary in the repo.
      # Optional.
      deployer-binary: "bin/dep"

Example

name: deploy

on: push

# It is important to specify "concurrency" for the workflow,
# to prevent concurrency between different deploys.
concurrency: production_environment

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.0'

      - name: Deploy
        uses: deployphp/action@v1
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          dep: deploy