Merge pull request #479 from manala/lazy.kubernetes/remove-sops-compl… #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://github.community/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/[email protected] | |
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 |