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 and update workflows with a build step #77

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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: 21 additions & 7 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 @@ -35,4 +49,4 @@ jobs:
- name: GH Pages URL
id: gh-pages-url
run: |
echo "View GH-Pages: $(https://adobedocs.github.io/${{ github.event.repository.name }})"
echo "View GH-Pages: $(https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }})"
27 changes: 21 additions & 6 deletions .github/workflows/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@ 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 # 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
Loading
Loading