ci-templates/.forgejo/workflows/typo3-build.yaml
Dominik Polakovics 324f1b1e19
All checks were successful
Self Test / test (push) Successful in 13s
fix: pipeline to download deployer recipe
2026-02-03 10:11:28 +01:00

68 lines
1.9 KiB
YAML

# Cloonar TYPO3 Staged Deployment Workflow
#
# Staged deployment: build → deploy to stage → run E2E tests → switch release
#
# Usage in project's .forgejo/workflows/deploy.yaml:
# name: Deploy
# on:
# push:
# branches: [main]
# jobs:
# deploy:
# uses: infrastructure/ci-templates/.forgejo/workflows/typo3-staged-deploy.yaml@main
# with:
# stage_url: https://myproject.cloonar.dev
# php_version: '8.3'
# secrets:
# stage_key: ${{ secrets.STAGE_KEY }}
# prod_key: ${{ secrets.PROD_KEY }}
name: TYPO3 Staged Deploy
on:
workflow_call:
inputs:
php_version:
description: 'PHP version'
required: false
type: string
default: '8.3'
env:
COMPOSER_ALLOW_SUPERUSER: 1
jobs:
# ===========================================================================
# Build
# ===========================================================================
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php_version }}
tools: composer
- name: Install PHP dependencies
run: |
composer install --prefer-dist --no-progress --no-dev --ignore-platform-reqs
curl -o deploy-lib.php https://git.cloonar.com/infrastructure/ci-templates/raw/branch/main/deployer/typo3-recipe.php
- name: Create artifact
run: |
tar -czf build.tar.gz \
bin public packages config vendor build composer.json composer.lock deploy-lib.php \
$([ -d "node_modules" ] && echo "node_modules") \
$([ -d "dist" ] && echo "dist") \
2>/dev/null || true
- uses: actions/upload-artifact@v3
with:
name: build-${{ github.sha }}
path: build.tar.gz
retention-days: 1