Skip to content

Instantly share code, notes, and snippets.

@thefrosty
Created November 22, 2023 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefrosty/c9aeaf2999387b12db279e3d58eae625 to your computer and use it in GitHub Desktop.
Save thefrosty/c9aeaf2999387b12db279e3d58eae625 to your computer and use it in GitHub Desktop.
GitHub Action Workflow
name: "Deploy to Linode"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
tag:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
coverage: none
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run composer install
run: |
composer install --no-interaction --optimize-autoloader
- name: Run composer update with --no-dev
run: |
composer update --no-dev --no-interaction --optimize-autoloader
- name: rsync deployment
uses: burnett01/rsync-deployments@6.0.0
with:
switches: -avz --exclude '.git' --exclude '.github' --exclude '.gitignore'
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment