Skip to content

Commit

Permalink
use pnpm
Browse files Browse the repository at this point in the history
I believe pnpm is still faster.

Replaced it just because npm was slow locally, didn't feel like waiting
  • Loading branch information
simenandre committed Dec 30, 2024
1 parent 5136f10 commit 454cf70
Show file tree
Hide file tree
Showing 8 changed files with 3,656 additions and 6,229 deletions.
5 changes: 0 additions & 5 deletions .astro/settings.json

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

permissions:
contents: read
pages: write
id-token: write

concurrency: preview-${{ github.ref }}

jobs:
pr:
runs-on: ubuntu-24.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2

- name: Use Node LTS ✨
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- name: Install dependencies 📦️
run: pnpm install --frozen-lockfile

- name: Build 🔨
run: pnpm run build
60 changes: 33 additions & 27 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
name: On Push
name: Deploy

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

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- main

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

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build:
name: Lint, format, test and build
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout 🛎️
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2

- name: Use Node LTS ✨
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
cache: pnpm

- name: Install dependencies 📦️
run: pnpm install --frozen-lockfile

- name: Build 🔨
run: pnpm build

- name: Upload GitHub Pages assets 📦️
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'dist/'
- name: Deploy to GitHub Pages
path: ./dist

deploy:
name: Deployment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,14 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.astro/
dist/

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

Loading

0 comments on commit 454cf70

Please sign in to comment.