Created
November 22, 2023 18:51
-
-
Save thefrosty/c9aeaf2999387b12db279e3d58eae625 to your computer and use it in GitHub Desktop.
GitHub Action Workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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