Created
January 31, 2024 19:42
-
-
Save passionweb-manuel-schnabel/f5d2fb208daf365b52546dd1df82e285 to your computer and use it in GitHub Desktop.
TYPO3 (v12) deployment with PHP Deployer and GitHub Actions (only workflow.yml)
This file contains 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 TYPO3 v12 via GitHub Actions | |
on: | |
push: | |
branches: | |
- deploy/typo3-v12 # Add your branch name which you want to deploy here | |
jobs: | |
deploy: | |
name: Deploy workflow # Name of the job | |
runs-on: ubuntu-latest # The type of machine to run the job on | |
steps: | |
- uses: actions/checkout@v4 # Checks-out your repository | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 # Sets up PHP environment | |
with: | |
php-version: 8.2 # The PHP version to setup | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT # Get the composer cache directory | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} # Path to the cache directory | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} # Key to identify the cache | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install Composer Dependencies # Use the cache from the previous step | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist # Install composer dependencies | |
- name: Deploy | |
uses: deployphp/action@master # Deploys your application | |
with: | |
private-key: ${{ secrets.PRIVATE_KEY }} # Add your private key to the repository secrets | |
dep: deploy # The command to run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment