From 0e89f3ee2909dab055afd4c73e9e9e3dfc55906a Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Tue, 24 Sep 2024 21:46:32 -0400 Subject: [PATCH] fix stuff --- .github/workflows/build-preview.yml | 47 ++++++------- .github/workflows/ci.yml | 20 +----- .github/workflows/deploy-preview.yml | 60 ++++++++-------- .github/workflows/deploy-prod.yml | 68 +++++++++---------- .../components/demos/collapsible-demo.svelte | 7 +- 5 files changed, 93 insertions(+), 109 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 84eade3..262150c 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a36460c..da65a70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 8c7d3cd..d569c61 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -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 diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 34f1120..89cdff7 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -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 diff --git a/sites/docs/src/lib/components/demos/collapsible-demo.svelte b/sites/docs/src/lib/components/demos/collapsible-demo.svelte index 950ff95..a4450ff 100644 --- a/sites/docs/src/lib/components/demos/collapsible-demo.svelte +++ b/sites/docs/src/lib/components/demos/collapsible-demo.svelte @@ -3,7 +3,7 @@ import { DotsSixVertical } from "$icons/index.js"; import { Button } from "$lib/components/ui/button"; - let paneOne = $state(); + let paneOne = $state(null!); let collapsed = $state(false); @@ -42,7 +42,10 @@ One - + paneOne.expand()} + class="bg-background relative flex w-2 items-center justify-center" + >