Skip to content

Commit

Permalink
Update github-pages.yaml for pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
foot authored Feb 9, 2024
1 parent bdf19ed commit e1a321e
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
Expand All @@ -34,17 +27,18 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache: 'pnpm' # Specify cache for pnpm
- name: Install pnpm
run: npm install -g pnpm # Install pnpm globally
- name: Install dependencies
run: npm install
run: pnpm install # Use pnpm to install dependencies
- name: Build
run: npm run build
run: pnpm run build # Use pnpm to run the build script
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload dist repository
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
Expand Down

0 comments on commit e1a321e

Please sign in to comment.