Skip to content

Commit

Permalink
Merge branch 'refs/heads/release' into SLB-222-Font-loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed May 29, 2024
2 parents 7a9af77 + b8b9024 commit 7dffe9f
Show file tree
Hide file tree
Showing 178 changed files with 6,748 additions and 959 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.

6 changes: 6 additions & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ environments:
- example.cms.amazeelabs.dev
- build:
- example.build.amazeelabs.dev
- preview:
- example.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
Expand All @@ -47,6 +49,8 @@ environments:
- stage-example.cms.amazeelabs.dev
- build:
- stage-example.build.amazeelabs.dev
- preview:
- stage-example.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
Expand All @@ -58,6 +62,8 @@ environments:
- dev-example.cms.amazeelabs.dev
- build:
- dev-example.build.amazeelabs.dev
- preview:
- dev-example.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
Expand Down
14 changes: 13 additions & 1 deletion .lagoon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN npm install -g [email protected] && pnpm config set store-dir /tmp/cache/pnpm

# Copy pnpm lockfile and install dependencies.
COPY pnpm-lock.yaml .npmrc /app/
#COPY patches /app/patches
# COPY patches /app/patches
RUN --mount=type=cache,target=/tmp/cache pnpm fetch && \
# There is a bug in pnpm: `pnpm fetch` creates _some_ node_modules folders
# with _some_ packages. This can lead to an incomplete package installation.
Expand Down Expand Up @@ -47,6 +47,7 @@ RUN --mount=type=cache,target=/tmp/cache pnpm i && \
# Deploy apps.
RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/cms" /tmp/.deploy/cms --prod
RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/website" /tmp/.deploy/website --prod
RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/preview" /tmp/.deploy/preview --prod

# ====================================================================================================
# CLI IMAGE
Expand Down Expand Up @@ -82,11 +83,22 @@ FROM uselagoon/nginx-drupal as nginx

COPY --from=cli /app /app
RUN cd /app/web && cp ../node_modules/@custom/ui/build/gutenberg.css .
RUN cd /app/web && cp ../node_modules/@custom/ui/build/iframe.css .
COPY .lagoon/nginx-conf/redirects-map.conf /etc/nginx/redirects-map.conf

WORKDIR /app
ENV WEBROOT=web

# ====================================================================================================
# PREVIEW IMAGE
# ====================================================================================================

FROM uselagoon/node-18:23.12.0 as preview

RUN npm install -g [email protected]
COPY --from=builder /tmp/.deploy/preview /app
CMD pnpm start

# ====================================================================================================
# PUBLISHER IMAGE
# ====================================================================================================
Expand Down
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
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@
"*.profile": "php"
},
"graphql-config.load.filePath": ".graphqlrc.json",
"graphql-config.load.rootDir": "packages/schema"
"graphql-config.load.rootDir": "packages/schema",
"phpsab.executablePathCBF": "./apps/cms/vendor/bin/phpcbf",
"phpsab.executablePathCS": "./apps/cms/vendor/bin/phpcs"
}
8 changes: 8 additions & 0 deletions apps/cms/.idea/.gitignore

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

Loading

0 comments on commit 7dffe9f

Please sign in to comment.