Skip to content

Commit

Permalink
Merge branch 'feature/pages' into release/fresher
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Jan 9, 2024
2 parents 23cc4e8 + 59e8a07 commit 713f4ca
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 17 deletions.
26 changes: 26 additions & 0 deletions .github/actions/pnpm-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: πŸ—οΈ PNPM Setup
on:
workflow_call:
inputs:
node-version:
description: 'Node.js version to use'
type: "string"
required: true
default: '20.x'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v3

- name: Use Node.js πŸ”§
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

# Version supplied from package.json.packageManager fields
# https://github.com/pnpm/action-setup/tree/v2/?tab=readme-ov-file#version
- name: Use PNPM πŸ”§
uses: pnpm/action-setup@v2
44 changes: 27 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🧹 Lint + πŸ—οΈ Build
name: πŸ—οΈ Build
on:
push:
branches:
Expand All @@ -8,36 +8,46 @@ on:
branches:
- main
- release/**

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v3

- name: Use Node.js πŸ”§
uses: actions/setup-node@v4
with:
node-version: 20.x

# Version supplied from package.json.packageManager fields
# https://github.com/pnpm/action-setup/tree/v2/?tab=readme-ov-file#version
- name: Use PNPM πŸ”§
uses: pnpm/action-setup@v2
- name: πŸ—οΈ PNPM Setup
uses: ./.github/actions/pnpm-setup.yml

- name: Install Dependencies πŸ”§
run: pnpm install

- name: Lint 🧹
run: pnpm lint

- name: Build πŸ”¨
run: pnpm run build

- name: Upload our build artifacts πŸ”Ί
- name: Upload Build Artifact πŸ“¦
uses: actions/upload-artifact@v2
with:
name: "build-${{ github.ref }}"
path: build

deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v3

- name: Download Build Artifact πŸ“¦
uses: actions/download-artifact@v2
with:
name: "build-${{ github.ref }}"
path: build

- name: Publish our Build Artifacts πŸ”Ί
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
Expand Down

0 comments on commit 713f4ca

Please sign in to comment.