Skip to content

feat: fix everything, basically (maybe) #34

feat: fix everything, basically (maybe)

feat: fix everything, basically (maybe) #34

Workflow file for this run

name: youkok2
on:
push:
branches: main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
##############################################################
# Workflow setup
##############################################################
- name: Checkout
uses: actions/checkout@v4
- name: Get release version
id: get_version
run: echo "name=RELEASE_VERSION::$(echo $GITHUB_SHA | cut -c1-8)" >> $GITHUB_ENV
##############################################################
# Frontend
##############################################################
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ./frontend/.nvmrc
- name: Build site frontend
run: |
cd frontend
npm i --force
npm run build:production
- name: Build admin frontend
run: |
cd frontend-admin
npm i --force
npm run build:production
##############################################################
# Backend
##############################################################
- name: Setup PHP with specific version of PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.3.11'
tools: composer
- name: Install site backend dependencies
run: |
cd youkok2
composer install
##############################################################
# Build and push docker images
##############################################################
- name: Build and publish nginx to Registry
uses: elgohr/Publish-Docker-Github-Action@master
env:
ENV: prod
COMPOSER_ALLOW_SUPERUSER: 1
with:
name: optimuscrime/youkok2-nginx
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker_nginx.Dockerfile
buildargs: ENV
tags: "latest,${{ env.RELEASE_VERSION }}"
- name: Build and publish php to Registry
uses: elgohr/Publish-Docker-Github-Action@master
env:
ENV: prod
with:
name: optimuscrime/youkok2-php
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker_php.Dockerfile
buildargs: ENV,COMPOSER_ALLOW_SUPERUSER
tags: "latest,${{ env.RELEASE_VERSION }}"