Skip to content

Commit

Permalink
Fixed workflow to work with pnpm and use node version from nvmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
maurer2 committed Aug 11, 2024
1 parent 17436b1 commit d87bd20
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy react to GH pages
name: Deploy React app to GH pages

on:
# Runs on pushes targeting the default branch
Expand Down Expand Up @@ -30,22 +30,34 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile # npm ci

- name: Build
run: npm run build
run: pnpm run build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: './dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit d87bd20

Please sign in to comment.