-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
319 changed files
with
11,635 additions
and
8,252 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,29 +7,38 @@ runs: | |
uses: jetify-com/[email protected] | ||
with: | ||
enable-cache: 'true' | ||
devbox-version: '0.13.3' # Setting a version is required to make the devbox fully cached. | ||
- name: Load devbox via direnv | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
|
||
- name: Check xdebug config | ||
shell: bash | ||
run: | | ||
if ! php --info | grep 'xdebug.mode => develop => develop'; then | ||
if ! php --info | grep 'xdebug.mode => no value => no value'; then | ||
echo 'Error: xdebug.mode should not be set in CI. Have you committed xdebug config by accident? Check devbox.d/php/php.ini' | ||
exit 1 | ||
fi | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
path: /tmp/cache | ||
key: | | ||
cache-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
cache-${{ hashFiles('**/pnpm-lock.yaml') }}- | ||
cache- | ||
- name: Set composer cache dir | ||
run: composer config --global cache-files-dir /tmp/cache/composer | ||
shell: bash | ||
- name: Set pnpm cache dir | ||
run: pnpm config set store-dir /tmp/cache/pnpm | ||
shell: bash | ||
- name: Set Playwright browsers dir | ||
run: | ||
echo "PLAYWRIGHT_BROWSERS_PATH=/tmp/cache/playwright-browsers" >> | ||
$GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: FE Build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
publisher_payload: | ||
description: Publisher payload | ||
required: true | ||
env: | ||
description: Environment | ||
required: true | ||
|
||
run-name: 'FE Build [env: ${{ inputs.env }}]' | ||
|
||
concurrency: | ||
group: fe_build_${{ inputs.env }} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: TurboRepo local server | ||
uses: felixmosh/turborepo-gh-artifacts@v2 | ||
with: | ||
server-token: 'local' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publisher | ||
uses: AmazeeLabs/publisher-action@4371b4a90a9fe2c86248e76c0f428e39abf6b610 | ||
with: | ||
success_env_var_name: BUILD_IS_SUCCESSFUL | ||
cache_paths: | | ||
apps/website/.cache | ||
apps/website/public | ||
cache_key: 'fe-build-${{ inputs.env }}' | ||
|
||
- name: Prepare | ||
run: SKIP_DRUPAL_INSTALL=1 pnpm turbo:prep | ||
env: | ||
TURBO_API: 'http://127.0.0.1:9080' | ||
TURBO_TOKEN: 'local' | ||
TURBO_TEAM: 'local' | ||
|
||
- name: Build & deploy | ||
run: | | ||
set -ex | ||
cd apps/website | ||
# Build | ||
if test -d public; then | ||
echo "Single build" | ||
pnpm build:gatsby | ||
else | ||
echo "Double build" | ||
# To mitigate Gatsby bug: | ||
# The first incremental build rewrites compilation hashes even if | ||
# there are no content changes. | ||
pnpm build:gatsby | ||
pnpm build:gatsby | ||
fi | ||
# "netlify deploy" fails to locate edge functions when executed from a | ||
# monorepo. Flags like --cwd or --filter do not help. So we deploy the | ||
# website app to a dedicated folder first. | ||
pnpm deploy --filter "@custom/website" /tmp/deploy --prod | ||
cd /tmp/deploy | ||
# Deploy | ||
pnpm netlify env:set AWS_LAMBDA_JS_RUNTIME nodejs20.x | ||
pnpm netlify env:set DRUPAL_EXTERNAL_URL $DRUPAL_EXTERNAL_URL | ||
pnpm netlify deploy --prodIfUnlocked | ||
# Report success to Publisher | ||
echo "BUILD_IS_SUCCESSFUL=1" >> $GITHUB_ENV | ||
env: | ||
TURBO_API: 'http://127.0.0.1:9080' | ||
TURBO_TOKEN: 'local' | ||
TURBO_TEAM: 'local' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,6 @@ jobs: | |
uses: devmasx/[email protected] | ||
with: | ||
type: now | ||
from_branch: dev | ||
target_branch: stage | ||
github_token: ${{ github.token }} |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ dts | |
apps/website/.env | ||
.DS_Store | ||
.turbo | ||
_local | ||
/_local |
Oops, something went wrong.