Skip to content

Commit

Permalink
add: ci pipeline to publish pr previews
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Aug 25, 2024
1 parent b67f029 commit e42a9aa
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Pull Request preview
on:
pull_request:
push:
branches:
- '**'
# Do not publish a preview when a release Tag is created, as we already publish a release
tags:
- '!**'

env:
NODE_VER: 22.5

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Use Node.js ${{ env.NODE_VER }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
cache: 'pnpm'

- name: Install deps
run: pnpm i

- name: Publish package preview
run: pnpx pkg-pr-new publish

0 comments on commit e42a9aa

Please sign in to comment.