Skip to content

Merge pull request #479 from manala/lazy.kubernetes/remove-sops-compl… #170

Merge pull request #479 from manala/lazy.kubernetes/remove-sops-compl…

Merge pull request #479 from manala/lazy.kubernetes/remove-sops-compl… #170

Workflow file for this run

name: Docs - Build
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-24.04
env:
working-directory: ./docs/app
defaults:
run:
# https://gh.neting.ccmunity/t/use-working-directory-for-entire-job/16747/9
working-directory: ${{ env.working-directory }}
steps:
- name: Checkout
uses: actions/checkout@v4
# https://github.com/actions/setup-node
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
extensions: "json"
ini-values: "memory_limit=-1"
php-version: "8.0"
- name: Determine composer cache directory
id: composer-cache
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ hashFiles('docs/app/composer.lock') }}
restore-keys: composer-
- name: Cache NPM dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: node-${{ hashFiles('docs/app/package-lock.json') }}
restore-keys: node-
- name: Install dependencies
run: |
echo "::group::composer install"
composer install --no-progress --no-suggest --ansi
echo "::endgroup::"
echo "::group::npm install"
npm install --color=always --no-progress
echo "::endgroup::"
- name: Warmup
run: |
echo "::group::warmup production env"
npx encore production --color
bin/console cache:clear --ansi
bin/console cache:warmup --ansi
echo "::endgroup::"
env:
APP_ENV: prod
WEBPACK_PUBLIC_PATH: /manala-recipes/build
- name: Build static site
run: bin/console stenope:build --no-interaction -vv --ansi
env:
APP_ENV: prod
ROUTER_DEFAULT_URI: https://manala.github.io/manala-recipes
# https://github.com/marketplace/actions/deploy-to-github-pages
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
COMMIT_MESSAGE: "[AUTO] Static site update"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/app/build # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch