Skip to content

Deployment is now working! 👌 #10

Deployment is now working! 👌

Deployment is now working! 👌 #10

Workflow file for this run

name: Deployment
on:
workflow_dispatch:
push:
branches:
- main
- production
jobs:
deploy:
name: Deploy
runs-on: ubuntu-20.04
environment: ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, iconv, json, mbstring, pdo
- name: Download dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--optimize-autoloader"
- name: Install assets
run: bin/console importmap:install
- name: Build assets (SASS)
run: bin/console sass:build
- name: Compile asset map
run: bin/console asset-map:compile
- name: Deploy files over SSH
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvcC -i --delete-after --delete-excluded"
SOURCE: "/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
EXCLUDE: "/migrations/, /var/, /.github/, /tests/, /tools/"