This GitHub Action builds and deploys a Shopware project using shopware-cli and deployer.
- Checks out your repository (optional)
- Sets up PHP with the specified version
- Installs Shopware CLI
- Builds the project using
shopware-cli project ci - Deploys using deployphp/action
| Input | Description | Required | Default |
|---|---|---|---|
phpVersion |
PHP version to use | No | 8.4 |
sshPrivateKey |
SSH private key for deployment (use secrets.SSH_PRIVATE_KEY) |
Yes | - |
deployCommand |
Deploy command to run | No | deploy |
path |
Path to the project | No | . |
skipCheckout |
Skip the checkout step | No | false |
name: Deploy
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/project-deployer@main
with:
sshPrivateKey: ${{ secrets.SSH_PRIVATE_KEY }}- uses: shopware/github-actions/project-deployer@main
with:
phpVersion: '8.3'
path: './shopware'
sshPrivateKey: ${{ secrets.SSH_PRIVATE_KEY }}
deployCommand: 'deploy production'- uses: actions/checkout@v6
- uses: shopware/github-actions/project-deployer@main
with:
skipCheckout: 'true'
sshPrivateKey: ${{ secrets.SSH_PRIVATE_KEY }}- SSH private key must be stored as a repository secret named
SSH_PRIVATE_KEY - Your project must have a deployer configuration file (deploy.php)