Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/adobe/gatsby-theme-a…
Browse files Browse the repository at this point in the history
…io-4.10.7
  • Loading branch information
fe-lix- authored Oct 30, 2024
2 parents 35d2bfd + 3813baf commit e8d0a06
Show file tree
Hide file tree
Showing 83 changed files with 5,958 additions and 471 deletions.
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

29 changes: 0 additions & 29 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,3 @@
## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html).
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
51 changes: 51 additions & 0 deletions .github/workflows/algolia-indexing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Search Indexing
on:
workflow_dispatch:
inputs:
mode:
description: 'Type of indexing. "index" to push to Algolia, "console" for dry run.'
required: true
default: "index"
type: choice
options:
- console
- index

jobs:
build-and-index:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node v18 for Yarn v4
uses: actions/setup-node@v3
with:
node-version: "18.19.0" # Current LTS version

- name: Enable Corepack for Yarn
run: corepack enable

- name: Install Dependencies
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Build site
run: yarn build

env:
NODE_OPTIONS: "--max_old_space_size=8192"
PREFIX_PATHS: true # equivalent to --prefix-paths flag for 'gatsby build'
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
REPO_BRANCH: ${{ github.ref_name }}
GATSBY_ALGOLIA_APPLICATION_ID: ${{ secrets.AIO_ALGOLIA_APPLICATION_ID }}
GATSBY_ALGOLIA_SEARCH_API_KEY: ${{ secrets.AIO_ALGOLIA_SEARCH_API_KEY }}
ALGOLIA_WRITE_API_KEY: ${{ secrets.AIO_ALGOLIA_WRITE_API_KEY }}
ALGOLIA_INDEXATION_MODE: ${{ github.event.inputs.mode || 'index' }}
GATSBY_ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME || github.event.repository.name }}
GATSBY_FEDS_PRIVACY_ID: ${{ secrets.AIO_FEDS_PRIVACY_ID }}
GATSBY_SITE_DOMAIN_URL: https://developer.adobe.com
68 changes: 37 additions & 31 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@ on:
workflow_dispatch:
inputs:
env:
description: 'Deploy to (dev|prod|dev prod)'
description: "Deploy to (dev|prod|dev prod)"
required: true
default: 'dev'
default: "dev"
clean:
description: 'Clean cache (yes|no)'
description: "Clean cache (yes|no)"
required: true
default: 'no'
default: "no"
excludeSubfolder:
description: 'Exclude a subfolder from deletion'
description: "Exclude a subfolder from deletion"
required: false
default: ''
default: ""
index-mode:
description: 'Type of indexing. "index" to push to Algolia, "console" for dry run.'
required: true
default: "index"
type: choice
options:
- console
- index
jobs:
set-state:
runs-on: ubuntu-latest
Expand All @@ -39,7 +47,7 @@ jobs:
result-encoding: string
- name: Get branch name
shell: bash
run: echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
run: echo "branch=${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT"
id: get_branch

echo-state:
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:
- name: Setup Node v16 for Yarn v3
uses: actions/setup-node@v3
with:
node-version: '16.15.0' # Current LTS version
node-version: "16.15.0" # Current LTS version

- name: Enable Corepack for Yarn v3
run: corepack enable
Expand All @@ -107,6 +115,7 @@ jobs:
key: ${{ needs.set-state.outputs.branch_short_ref }}-gatsby-cache-${{ github.run_id }}
restore-keys: |
${{ needs.set-state.outputs.branch_short_ref }}-gatsby-cache-
- name: Clean Cache
if: needs.set-state.outputs.clean_cache == 'true'
uses: borales/actions-yarn@v3
Expand All @@ -122,7 +131,7 @@ jobs:
PATH_PREFIX: ${{ needs.set-state.outputs.path_prefix }}
GATSBY_ADOBE_LAUNCH_SRC: ${{ secrets.AIO_ADOBE_LAUNCH_DEV_SRC }}
GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS: ${{ secrets.AIO_REPORT_SUITE_DEV}}
GATSBY_ADOBE_ANALYTICS_ENV: 'dev'
GATSBY_ADOBE_ANALYTICS_ENV: "dev"
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.event.repository.owner.login }}
REPO_NAME: ${{ github.event.repository.name }}
Expand All @@ -141,24 +150,22 @@ jobs:
GATSBY_ALGOLIA_SEARCH_INDEX: ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
GATSBY_ALGOLIA_INDEX_ENV_PREFIX: ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
GATSBY_FEDS_PRIVACY_ID: ${{ secrets.AIO_FEDS_PRIVACY_ID }}
GATSBY_SITE_DOMAIN_URL: https://developer-stage.adobe.com

- name: Deploy
uses: icaraps/static-website-deploy@master
uses: AdobeDocs/static-website-deploy@master
with:
enabled-static-website: 'true'
source: 'public'
enabled-static-website: "true"
source: "public"
target: ${{ needs.set-state.outputs.path_prefix }}
connection-string: ${{ secrets.AIO_AZURE_DEV_CONNECTION_STRING }}
remove-existing-files: 'true'
remove-existing-files: "true"
exclude-subfolder: ${{ needs.set-state.outputs.exclude_subfolder }}
- name: Delay purge
run: sleep 60s
shell: bash
- name: Purge Fastly Cache
uses: icaraps/gatsby-fastly-purge-action@master
uses: AdobeDocs/gatsby-fastly-purge-action@master
with:
fastly-token: ${{ secrets.AIO_FASTLY_TOKEN }}
fastly-url: '${{ secrets.AIO_FASTLY_DEV_URL}}${{ needs.set-state.outputs.path_prefix }}'
fastly-url: "${{ secrets.AIO_FASTLY_DEV_URL}}${{ needs.set-state.outputs.path_prefix }}"

pre-build-production:
needs: [set-state]
Expand Down Expand Up @@ -186,7 +193,7 @@ jobs:
- name: Setup Node v16 for Yarn v3
uses: actions/setup-node@v3
with:
node-version: '16.15.0' # Current LTS version
node-version: "16.15.0" # Current LTS version

- name: Enable Corepack for Yarn v3
run: corepack enable
Expand All @@ -212,6 +219,7 @@ jobs:
key: ${{ needs.set-state.outputs.branch_short_ref }}-gatsby-cache-${{ github.run_id }}
restore-keys: |
${{ needs.set-state.outputs.branch_short_ref }}-gatsby-cache-
- name: Clean Cache
if: needs.set-state.outputs.clean_cache == 'true'
uses: borales/actions-yarn@v3
Expand All @@ -227,7 +235,7 @@ jobs:
PATH_PREFIX: ${{ needs.set-state.outputs.path_prefix }}
GATSBY_ADOBE_LAUNCH_SRC: ${{ secrets.AIO_ADOBE_LAUNCH_PROD_SRC }}
GATSBY_ADDITIONAL_ADOBE_ANALYTICS_ACCOUNTS: ${{ secrets.AIO_REPORT_SUITE_PROD }}
GATSBY_ADOBE_ANALYTICS_ENV: 'production'
GATSBY_ADOBE_ANALYTICS_ENV: "production"
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.event.repository.owner.login }}
REPO_NAME: ${{ github.event.repository.name }}
Expand All @@ -243,26 +251,24 @@ jobs:
GATSBY_ALGOLIA_APP_ID: ${{ secrets.AIO_ALGOLIA_APP_ID }}
GATSBY_ALGOLIA_API_KEY: ${{ secrets.AIO_ALGOLIA_API_KEY }}
ALGOLIA_WRITE_API_KEY: ${{ secrets.AIO_ALGOLIA_WRITE_API_KEY }}
ALGOLIA_INDEXATION_MODE: ${{ secrets.AIO_ALGOLIA_INDEXATION_MODE }}
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME || github.event.repository.name }}
ALGOLIA_INDEXATION_MODE: ${{ github.event.inputs.index-mode || 'index' }}
GATSBY_ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME || github.event.repository.name }}
GATSBY_ALGOLIA_INDEX_ALL_SRC: ${{ secrets.AIO_ALGOLIA_INDEX_ALL_SRC }}
GATSBY_ALGOLIA_SEARCH_INDEX: ${{ secrets.AIO_ALGOLIA_SEARCH_INDEX }}
GATSBY_ALGOLIA_INDEX_ENV_PREFIX: ${{ secrets.AIO_ALGOLIA_INDEX_ENV_PREFIX }}
GATSBY_FEDS_PRIVACY_ID: ${{ secrets.AIO_FEDS_PRIVACY_ID }}
GATSBY_SITE_DOMAIN_URL: https://developer.adobe.com
- name: Deploy
uses: icaraps/static-website-deploy@master
uses: AdobeDocs/static-website-deploy@master
with:
enabled-static-website: 'true'
source: 'public'
enabled-static-website: "true"
source: "public"
target: ${{ needs.set-state.outputs.path_prefix }}
connection-string: ${{ secrets.AIO_AZURE_PROD_CONNECTION_STRING }}
remove-existing-files: 'true'
remove-existing-files: "true"
exclude-subfolder: ${{ needs.set-state.outputs.exclude_subfolder }}
- name: Delay purge
run: sleep 60s
shell: bash
- name: Purge Fastly Cache
uses: icaraps/gatsby-fastly-purge-action@master
uses: AdobeDocs/gatsby-fastly-purge-action@master
with:
fastly-token: ${{ secrets.AIO_FASTLY_TOKEN }}
fastly-url: '${{ secrets.AIO_FASTLY_PROD_URL }}${{ needs.set-state.outputs.path_prefix }}'
fastly-url: "${{ secrets.AIO_FASTLY_PROD_URL }}${{ needs.set-state.outputs.path_prefix }}"
Loading

0 comments on commit e8d0a06

Please sign in to comment.