Skip to content

Commit

Permalink
Merge pull request #123 from AdobeDocs/ds_fix-workflows
Browse files Browse the repository at this point in the history
Fix the failing GH workflows
  • Loading branch information
dshevtsov authored Dec 13, 2023
2 parents 604d9e2 + 83d5a17 commit f29dba1
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 72 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Yarn Install
uses: bahmutov/npm-install@v1
- name: Build
run: |
yarn build
uses: actions/checkout@v4

- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- 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 # works like --prefix-paths flag for 'gatsby build'
PATH_PREFIX: ${{ github.event.repository.name }}
ADOBE_LAUNCH_SRC: ${{ secrets.AIO_ADOBE_LAUNCH_SRC }}
Expand All @@ -25,13 +39,15 @@ jobs:
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
GOOGLE_DOCS_TOKEN: ${{ secrets.GOOGLE_DOCS_TOKEN }}
GOOGLE_DOCS_FOLDER_ID: ${{ secrets.GOOGLE_DOCS_FOLDER_ID }}

- name: Deploy to GH Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.
clean: true # Automatically remove deleted files from deploy branch

- name: GH Pages URL
id: gh-pages-url
run: |
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,29 @@ jobs:
build-and-index:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node v16 for Yarn v3
- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version: '16.15.0' # Current LTS version
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Enable Corepack for Yarn v3
- name: Enable Corepack for Yarn
run: corepack enable

- name: Install Yarn v3
uses: borales/actions-yarn@v3
with:
cmd: set version stable

- name: Install dependencies
uses: borales/actions-yarn@v3
with:
cmd: install
- name: Install Dependencies
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Build site
uses: borales/actions-yarn@v3
with:
cmd: build
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 }}
Expand Down
33 changes: 13 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
branch_short_ref: ${{ steps.get_branch.outputs.branch }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get pathPrefix
uses: actions/github-script@v6
Expand Down Expand Up @@ -56,30 +56,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node v16 for Yarn v3
- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version: '16.15.0' # Current LTS version

- name: Enable Corepack for Yarn v3
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Enable Corepack for Yarn
run: corepack enable

- name: Install Yarn v3
uses: borales/actions-yarn@v3
with:
cmd: set version stable


- name: Install Dependencies
uses: borales/actions-yarn@v3
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
with:
cmd: install


- name: Gatsby Cache
uses: actions/cache@v2
uses: actions/cache@v3.3.2
with:
path: |
public
Expand All @@ -89,9 +84,7 @@ jobs:
${{ needs.set-state.outputs.branch_short_ref }}-gatsby-cache-
- name: Build site
uses: borales/actions-yarn@v3
with:
cmd: build
run: yarn build
env:
NODE_OPTIONS: "--max_old_space_size=8192"
PREFIX_PATHS: true # equivalent to --prefix-paths flag for 'gatsby build'
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
clean:
description: 'Clean cache (yes|no)'
required: true
default: 'no'
default: 'yes'
excludeSubfolder:
description: 'Exclude a subfolder from deletion'
required: false
Expand All @@ -21,7 +21,7 @@ jobs:
exclude_subfolder: ${{ github.event.inputs.excludeSubfolder }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get pathPrefix
uses: actions/github-script@v6
Expand Down Expand Up @@ -67,30 +67,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node v16 for Yarn v3
- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version: '16.15.0' # Current LTS version
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Enable Corepack for Yarn v3
- name: Enable Corepack for Yarn
run: corepack enable

- name: Install Yarn v3
uses: borales/actions-yarn@v3
with:
cmd: set version stable

- name: Install Dependencies
uses: borales/actions-yarn@v3
run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
with:
cmd: install

- name: Gatsby Cache
uses: actions/cache@v2
uses: actions/cache@v3.3.2
with:
path: |
public
Expand All @@ -101,16 +96,11 @@ jobs:
- name: Clean Cache
if: needs.set-state.outputs.clean_cache == 'true'
uses: borales/actions-yarn@v3
with:
cmd: clean
run: yarn clean

- name: Build site
uses: borales/actions-yarn@v3
with:
cmd: build
run: yarn build
env:
NODE_OPTIONS: "--max_old_space_size=8192"
PREFIX_PATHS: true # equivalent to --prefix-paths flag for 'gatsby build'
PATH_PREFIX: ${{ needs.set-state.outputs.path_prefix }}
GATSBY_ADOBE_LAUNCH_SRC: ${{ secrets.AIO_ADOBE_LAUNCH_DEV_SRC }}
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.20
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"react-dom": "^17.0.2"
},
"scripts": {
"start": "gatsby build && gatsby serve",
"start:prefix": "gatsby build --prefix-paths && gatsby serve --prefix-paths",
"dev": "gatsby develop",
"dev:https": "gatsby develop --https --host localhost.corp.adobe.com --port 9000",
"build": "gatsby build",
"serve": "gatsby serve",
"start": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build && gatsby serve",
"start:prefix": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build --prefix-paths && gatsby serve --prefix-paths",
"dev": "NODE_OPTIONS='--max-old-space-size=8192' gatsby develop",
"dev:https": "NODE_OPTIONS='--max-old-space-size=8192' gatsby develop --https --host localhost.corp.adobe.com --port 9000",
"build": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build",
"serve": "NODE_OPTIONS='--max-old-space-size=8192' gatsby serve",
"clean": "gatsby clean",
"test": "remark src/pages --quiet --frail",
"lint": "docker run --rm -e RUN_LOCAL=true --env-file '.github/super-linter.env' -v \"$PWD\":/tmp/lint github/super-linter:slim-v4.10.1"
"lint": "docker run --rm -e RUN_LOCAL=true --env-file .github/super-linter.env -v \"$PWD\":/tmp/lint github/super-linter:slim-v4.10.1"
},
"packageManager": "yarn@3.2.1",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/amazon-sales-channel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Amazon Sales Channel on App Builder is based on an existing PHP extension (Amazo

<InlineAlert variant="warning" slots="text" />

This app is not intended or supported for production use. While the provided capabilities are robust, they are only to be used as a reference to build your own applications. Merchants looking to connect and synchronize their Amazon store with Commerce should use the existing [Amazon Sales Channel PHP extension](https://marketplace.magento.com/magento-module-amazon.html), which can be acquired through Commerce Marketplace, or implement another integration.
This app is not intended or supported for production use. While the provided capabilities are robust, they are only to be used as a reference to build your own applications. Merchants looking to connect and synchronize their Amazon store with Commerce should use the existing Amazon Sales Channel PHP extension, which can be acquired through Commerce Marketplace, or implement another integration.

To install this app, clone the [aio-amazon-sales-channel](https://github.com/adobe/amazon-sales-channel-app-builder) repo and follow the procedures described in [Prequisites](prerequisites.md) and [Install the Amazon Sales Channel app](installation.md).

Expand Down

0 comments on commit f29dba1

Please sign in to comment.