Skip to content

Instantly share code, notes, and snippets.

@stefanzweifel
Created April 12, 2021 11:05
Show Gist options
  • Save stefanzweifel/70f515fb6d1c8aba4d98dadd40247b77 to your computer and use it in GitHub Desktop.
Save stefanzweifel/70f515fb6d1c8aba4d98dadd40247b77 to your computer and use it in GitHub Desktop.
A very very very simple approach to start a deployer deployment through GitHub Actions.
name: Deployment
on:
repository_dispatch:
types: ['deploy']
workflow_dispatch:
inputs:
deploy_host:
description: 'Environment'
required: true
default: 'stag'
jobs:
deploy-stage:
name: Deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 8.0
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Deploy
uses: deployphp/action@master
with:
private-key: ${{ secrets.DEPLOY_KEY }}
known-hosts: ${{ secrets.KNOWN_HOSTS }}
dep: deploy ${{ github.event.inputs.deploy_host }} --branch=main -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment