Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release' into SLB-287-background…
Browse files Browse the repository at this point in the history
…-image-cards

# Conflicts:
#	packages/ui/src/components/Organisms/PageDisplay.tsx
#	packages/ui/src/components/Organisms/PageHero.tsx
#	packages/ui/src/components/Routes/Page.stories.tsx
  • Loading branch information
mattiasimonato committed May 18, 2024
2 parents 43a8349 + 6d2da17 commit ada150d
Show file tree
Hide file tree
Showing 86 changed files with 2,511 additions and 549 deletions.
4 changes: 0 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ runs:
shell: bash
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm i

- name: Check formatting
shell: bash
run: pnpm test:format

- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ jobs:

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
run:
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >>
$GITHUB_OUTPUT
id: extract_branch

- name: Prepare deployment package
run: pnpm turbo:prep && pnpm deploy --filter "@custom/website" ../deploy --prod
run:
pnpm turbo:prep && pnpm deploy --filter "@custom/website" ../deploy
--prod
env:
VITE_DECAP_REPO: ${{ github.repository }}
VITE_DECAP_BRANCH: ${{ steps.extract_branch.outputs.branch }}
Expand All @@ -54,16 +58,21 @@ jobs:
- name: Deploy to dev
run: pnpm netlify deploy --prod --filter "@custom/website"
working-directory: ../deploy
if: github.ref == 'refs/heads/dev' && steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID != ''
if:
github.ref == 'refs/heads/dev' &&
steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID
!= ''
env:
NETLIFY_SITE_ID: ${{ vars.NETLIFY_DEV_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

- name: Deploy to prod
run: pnpm netlify deploy --prod --filter "@custom/website"
working-directory: ../deploy
if: github.ref == 'refs/heads/prod' && steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_PROD_ID != ''
if:
github.ref == 'refs/heads/prod' &&
steps.netlify-check.outputs.available == 'true' &&
vars.NETLIFY_PROD_ID != ''
env:
NETLIFY_SITE_ID: ${{ vars.NETLIFY_PROD_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

8 changes: 6 additions & 2 deletions .github/workflows/high_content_volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
run: pnpm --filter "@custom/website" clean

- name: 'Drupal: Create content'
run: pnpm --filter "@custom/cms" drush php:script scripts/create-lots-of-content/run.php
run:
pnpm --filter "@custom/cms" drush php:script
scripts/create-lots-of-content/run.php

- name: 'Gatsby: Full build'
run: pnpm --filter "@custom/website" build:gatsby
Expand All @@ -44,7 +46,9 @@ jobs:
run: pnpm --filter "@custom/website" build:gatsby

- name: 'Drupal: Create more content'
run: pnpm --filter "@custom/cms" drush php:script scripts/create-lots-of-content/create-100-pages.php
run:
pnpm --filter "@custom/cms" drush php:script
scripts/create-lots-of-content/create-100-pages.php

- name: 'Gatsby: Incremental build with new content'
run: pnpm --filter "@custom/website" build:gatsby
2 changes: 1 addition & 1 deletion .github/workflows/merge_dev_to_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
with:
type: now
target_branch: stage
github_token: ${{ github.token }}
github_token: ${{ github.token }}
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
steps:
- name: Init check
if: ${{ github.repository != 'AmazeeLabs/silverback-template'}}
run: echo 'Please run the INIT script. See the root README.md for instructions.' && false
run:
echo 'Please run the INIT script. See the root README.md for
instructions.' && false

- name: Checkout
uses: actions/checkout@v3
Expand All @@ -19,6 +21,9 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Check formatting
run: pnpm test:format

- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
Expand Down Expand Up @@ -59,6 +64,8 @@ jobs:
storybookBaseDir: packages/ui
onlyChanged: true
exitOnceUploaded: true
externals: |
static/stories/webforms/**
if: ${{ steps.chromatic-check.outputs.available == 'true' }}

- name: Deploy storybook to netlify
Expand All @@ -75,7 +82,9 @@ jobs:

- name: Merge release to prod (silverback-template only)
uses: devmasx/[email protected]
if: ${{ github.repository == 'AmazeeLabs/silverback-template' && github.ref == 'refs/heads/release'}}
if:
${{ github.repository == 'AmazeeLabs/silverback-template' &&
github.ref == 'refs/heads/release'}}
with:
type: now
from_branch: release
Expand All @@ -84,7 +93,9 @@ jobs:

docker_build:
name: Docker Build
if: startsWith(github.ref_name, 'test-all/') || startsWith(github.head_ref, 'test-all/')
if:
startsWith(github.ref_name, 'test-all/') || startsWith(github.head_ref,
'test-all/')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/test_without_turbo_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ on:
workflow_dispatch:

jobs:

test:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Init check
if: ${{ github.repository != 'AmazeeLabs/silverback-template'}}
run:
echo 'Please run the INIT script. See the root README.md for
instructions.' && false

- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -16,8 +21,18 @@ jobs:
- 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: Test
run: pnpm turbo:test
run: pnpm turbo:test:force
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: 'local'
TURBO_TEAM: 'local'

- name: Upload Playwright report
uses: actions/upload-artifact@v3
Expand Down
5 changes: 0 additions & 5 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,3 @@ RUN chmod a+x phpactor.phar
RUN sudo mv phpactor.phar /usr/local/bin/phpactor
# Install gh cli
RUN sudo install-packages gh

RUN curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_0.40.2_Linux_x86_64.tar.gz" \
&& tar xf lazygit.tar.gz lazygit \
&& sudo install lazygit /usr/local/bin

2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tasks:
- name: Setup
init: pnpm install && pnpm turbo build --no-daemon --go-fallback && gp sync-done setup
init: pnpm install && pnpm turbo build gp sync-done setup
env:
NETLIFY_URL: http://localhost:8000
DRUPAL_EXTERNAL_URL: http://localhost:8888
Expand Down
2 changes: 1 addition & 1 deletion .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ apps
packages
tests
.turbo
pnpm-lock.yaml
2 changes: 2 additions & 0 deletions apps/cms/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config/sync
composer.lock
3 changes: 3 additions & 0 deletions apps/cms/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
},
"amazeelabs/silverback_gatsby": {
"Autosave preview": "./patches/fetch-entity.patch"
},
"drupal/gutenberg": {
"Gutenberg enabled hook": "https://www.drupal.org/files/issues/2024-05-07/gutenberg_enabled_hook_3445677-2.patch"
}
},
"patchLevel": {
Expand Down
103 changes: 103 additions & 0 deletions apps/cms/config/sync/core.entity_form_display.node.page.split.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
uuid: a39d0011-2ebf-4b18-a9f0-8b5aeff5b9aa
langcode: en
status: true
dependencies:
config:
- core.entity_form_mode.node.split
- field.field.node.page.body
- field.field.node.page.field_metatags
- node.type.page
- workflows.workflow.basic
module:
- content_moderation
- metatag
- path
id: node.page.split
targetEntityType: node
bundle: page
mode: split
content:
created:
type: datetime_timestamp
weight: 3
region: content
settings: { }
third_party_settings: { }
field_metatags:
type: metatag_firehose
weight: 11
region: content
settings:
sidebar: true
use_details: true
third_party_settings: { }
langcode:
type: language_select
weight: 1
region: content
settings:
include_locked: true
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 9
region: content
settings: { }
third_party_settings: { }
path:
type: path
weight: 7
region: content
settings: { }
third_party_settings: { }
promote:
type: boolean_checkbox
weight: 5
region: content
settings:
display_label: true
third_party_settings: { }
status:
type: boolean_checkbox
weight: 10
region: content
settings:
display_label: true
third_party_settings: { }
sticky:
type: boolean_checkbox
weight: 6
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
translation:
weight: 4
region: content
settings: { }
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 2
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
url_redirects:
weight: 8
region: content
settings: { }
third_party_settings: { }
hidden:
body: true
11 changes: 11 additions & 0 deletions apps/cms/config/sync/core.entity_form_mode.node.split.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
uuid: 5f26940d-fd06-41e0-8e59-9dfcdc9c86df
langcode: en
status: true
dependencies:
module:
- node
id: node.split
label: Split
description: ''
targetEntityType: node
cache: true
1 change: 1 addition & 0 deletions apps/cms/config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module:
dropzonejs: 0
dynamic_page_cache: 0
editor: 0
entity_create_split: 0
entity_usage: 0
environment_indicator: 0
field: 0
Expand Down
Empty file removed apps/cms/patches/.gitkeep
Empty file.
8 changes: 4 additions & 4 deletions apps/cms/scaffold/all.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
parameters:
# Configure Cross-Site HTTP requests (CORS).
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
# for more information about the topic in general.
# Note: By default the configuration is disabled.
# Configure Cross-Site HTTP requests (CORS).
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
# for more information about the topic in general.
# Note: By default the configuration is disabled.
cors.config:
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
Expand Down
7 changes: 5 additions & 2 deletions apps/website/netlify/functions/github-proxy.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export default function (request: Request, context: Context) {
if (!process.env.DECAP_GITHUB_TOKEN) {
throw new Error('Missing environment variable DECAP_GITHUB_TOKEN.');
}
return githubProxy(request, process.env.DECAP_GITHUB_TOKEN, '/.netlify/functions/github-proxy');
return githubProxy(
request,
process.env.DECAP_GITHUB_TOKEN,
'/.netlify/functions/github-proxy',
);
}

2 changes: 1 addition & 1 deletion apps/website/publisher.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig({
// cannot report it.
// Workaround: Do a double build on the first build.
'if test -d public; then echo "Single build" && pnpm build:gatsby; else echo "Double build" && pnpm build:gatsby && pnpm build:gatsby; fi'
: 'pnpm build:gatsby',
: 'DRUPAL_EXTERNAL_URL=http://127.0.0.1:8888 pnpm build:gatsby',
outputTimeout: 1000 * 60 * 10,
},
clean: 'pnpm clean',
Expand Down
Loading

0 comments on commit ada150d

Please sign in to comment.