Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the failing GH workflows #123

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading