Skip to content

Commit

Permalink
fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Sep 25, 2024
1 parent c72c30b commit 0e89f3e
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 109 deletions.
47 changes: 22 additions & 25 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,32 @@ 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
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

on:
pull_request:
types: [opened, synchronize]
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
build-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install

- name: Install dependencies
run: pnpm install
- name: Build site
run: pnpm build

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

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

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Sync
run: pnpm sync

- name: Run svelte-check
run: pnpm check

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

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

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

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

permissions:
actions: read
deployments: write
contents: read
pull-requests: write
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 }}
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
- 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
68 changes: 33 additions & 35 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
name: Production Deployment
on:
push:
branches:
- main
paths:
- sites/docs/**
- packages/paneforge/**
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
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
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

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

- name: Build site
run: pnpm build
- 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
- 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
7 changes: 5 additions & 2 deletions sites/docs/src/lib/components/demos/collapsible-demo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { DotsSixVertical } from "$icons/index.js";
import { Button } from "$lib/components/ui/button";
let paneOne = $state<Pane>();
let paneOne = $state<Pane>(null!);
let collapsed = $state(false);
</script>

Expand Down Expand Up @@ -42,7 +42,10 @@
<span class="font-semibold">One</span>
</div>
</Pane>
<PaneResizer class="bg-background relative flex w-2 items-center justify-center">
<PaneResizer
ondblclick={() => paneOne.expand()}
class="bg-background relative flex w-2 items-center justify-center"
>
<div class="bg-brand z-10 flex h-7 w-5 items-center justify-center rounded-sm border">
<DotsSixVertical class="size-4 text-black" weight="bold" />
</div>
Expand Down

0 comments on commit 0e89f3e

Please sign in to comment.