Skip to main content

VOL. II

FULLHAUS DEV DUNGEON

FULLHAUS DEV DUNGEON is a monthly-ish dev huddle for updates on the FULLHAUS tech stack, team related stuff, for building team culture and promoting exchange among us πŸŽ‰.

Tech Stack Updates​

  1. Recap TYPO3 Surfcamp
  2. GitHub Actions
  3. DEVHAUS
  4. Accessibility
  5. Monthly Dungeon Pick

Recap TYPO3 Surfcamp​

TYPO3 Surfcamp πŸ€™β€‹

  • 40 persons from the TYPO3 Community
  • From all over Europe (Hungary, Albania, Poland, Germany)
  • 6 Teams -> 6 different Website Projects
  • Goal: explore new v13 site sets
  • My Team Portfolio: 1 week - 159 Commits

The result πŸŽ‰β€‹

We released an official TYPO3 extension:

https://extensions.typo3.org/extension/theme_portfolio

Site Sets are awesome πŸ”₯!

Obacht:

TYPO3 Surfcamp might return in 2025 for all participants under 35 (sorry old people πŸ˜‰).

Watch out for the announcement at T3DD 2024 and sign up quickly, it's an awesome experience!

GitHub Actions​

What's GitHub Actions?​

GitHub Actions are workflows which are defined in YAML files. They can do different kind of jobs.

What kind of jobs can they do?​

  • Testing
  • Builds
  • Deployments
  • Analysis and updates
  • Integration to other systems (Slack, Teams, Telegram)

Structure of Actions​

Workflows​

A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule.

Workflows are defined in the .github/workflows directory in a repository

Events​

An event is a specific activity in a repository that triggers a workflow run. For example, activity can originate from GitHub when someone creates a pull request, opens an issue, or pushes a commit to a repository.

Jobs​

A job is a set of steps in a workflow that is executed on the same runner. Each step is either a shell script that will be executed, or an action that will be run.

Actions​

An action is a custom application for the GitHub Actions platform that performs a complex but frequently repeated task. You can write your own actions, or you can find actions to use in your workflows in the GitHub Marketplace.

Deployment Examples​

Deploy TYPO3 with deployer to remote host

name: deploy
on: push
concurrency: production_environment
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install dependencies
run: composer install

- name: Deploy
uses: deployphp/action@v1
with:
dep: deploy
private-key: ${{ secrets.PRIVATE_KEY }};

Deploy Symfony with rsync

name: Build and Deploy via SSH

env:
PHP_VERSION: '8.2' # set this to the PHP version to use

on:
push:
branches:
- main
schedule:
- cron: '0 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
environment:
name: 'Production'
url: 'https://my-site.de/'
steps:
- uses: actions/checkout@v3

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: Install dependencies
run: npm install -f

- name: Build
run: npm run build

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Set up dependency caching for faster installs
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Run composer install
run: composer install --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --apcu-autoloader --no-progress

- name: rsync deployments
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr --delete --exclude=".env.local" --exclude="assets/website" --exclude="assets/admin" --exclude="var" --exclude="uploads" --exclude="node_modules" --exclude=".github" --exclude=".git"
path: ./
remote_path: '/var/www/site'
remote_host: host.my-site.de
remote_user: groot
remote_key: ${{ secrets.PRIVATE_KEY }}

- name: Post deploy
uses: appleboy/ssh-action@v0.1.10
with:
host: host.my-site.de
username: u108779375
key: ${{ secrets.PRIVATE_KEY }}
script: |
cd /var/www/site
touch maintenance.lock
php bin/console phpcr:migrations:migrate
php bin/websiteconsole cache:clear --no-warmup
rm -rf maintenance.lock
php bin/websiteconsole cache:clear --no-warmup
php bin/console cache:clear --no-warmup
php bin/websiteconsole fos:httpcache:clear
php bin/websiteconsole cache:warmup

Best practices​

  • use reusable workflows
  • manage secretes and access keys securely
  • extensive documentation and comments

Conclusion​

GitHub Actions are a powerful tool for automating processes and integrating them in your development workflows

DEVHAUS​

If you are reading this here you probably already know what this is otherwise checkout the introduction page.

A ❀️ for Accessibility​

  • The β€žEuropean Accessibility Actβ€œ 2025
  • This policy obliges all EU member states to make all online commerce barrier-free for consumers
  • excluded are only companies with less than 10 employees / a maximum annual sale or annual balance sheet total of 2 million euros

TASK FORCE WITH UI / UX TEAM NEEDED TO BRACE FOR IMPACT?

Dungeon Pick​

git push --force-with-lease
Will only force push if local is in sync with remote, push fails otherwise