Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Sep 25, 2024
2 parents b12b813 + dd6668f commit a929555
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 56 deletions.
5 changes: 0 additions & 5 deletions .changeset/selfish-eggs-care.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Preview Deployment

# cancel in-progress runs on new commits to same PR (github.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

on:
pull_request:
types: [opened, synchronize]

jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build site
run: pnpm build

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: preview-build
path: sites/docs/.svelte-kit/cloudflare
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 18
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Sync
run: pnpm sync

Expand All @@ -37,9 +43,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
name: Install pnpm
with:
version: 8

- name: Install Node.JS
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 18
cache: pnpm

- name: Install dependencies
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Upload Preview Deployment

on:
workflow_run:
workflows: ["Build Preview Deployment"]
types:
- completed

permissions:
actions: read
deployments: write
contents: read
pull-requests: write

jobs:
deploy-preview:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
id: preview-build-artifact
with:
name: preview-build
path: build
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Deploy to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: paneforge
directory: ${{ steps.preview-build-artifact.outputs.download-path }}
workingDirectory: sites/docs
deploymentName: Preview
42 changes: 42 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Production Deployment
on:
push:
branches:
- main
paths:
- sites/docs/**
- packages/paneforge/**

jobs:
deploy-production:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy Production Site to Cloudflare Pages
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build site
run: pnpm build

- name: Deploy to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: paneforge
directory: ./.svelte-kit/cloudflare
workingDirectory: sites/docs
deploymentName: Production
42 changes: 0 additions & 42 deletions .github/workflows/docs-production.yml

This file was deleted.

16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

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

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
6 changes: 6 additions & 0 deletions packages/paneforge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# paneforge

## 0.0.6

### Patch Changes

- chore: add license to `package.json` ([#36](https://github.com/svecosystem/paneforge/pull/36))

## 0.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/paneforge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paneforge",
"version": "0.0.5",
"version": "0.0.6",
"author": {
"name": "Hunter Johnston",
"url": "https://github.com/huntabyte"
Expand Down

0 comments on commit a929555

Please sign in to comment.