From 4c1771f68a1e7cd6d046a227b52fff4676a14bb6 Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Thu, 12 Dec 2024 21:59:00 -0500 Subject: [PATCH] next docs --- .github/ISSUE_TEMPLATE/3-bug_report.yml | 2 +- .github/workflows/build-preview.yml | 4 +-- .github/workflows/ci.yml | 35 ++++++++++--------------- .github/workflows/deploy-preview.yml | 2 +- .github/workflows/deploy-prod.yml | 7 ++--- .github/workflows/preview-release.yml | 28 ++++++++++++++++++++ .github/workflows/release.yml | 9 ++----- 7 files changed, 52 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/preview-release.yml diff --git a/.github/ISSUE_TEMPLATE/3-bug_report.yml b/.github/ISSUE_TEMPLATE/3-bug_report.yml index 137a488..176aba7 100644 --- a/.github/ISSUE_TEMPLATE/3-bug_report.yml +++ b/.github/ISSUE_TEMPLATE/3-bug_report.yml @@ -24,7 +24,7 @@ body: attributes: label: Reproduction description: | - Please provide a link to a repo or Stackblitz that can reproduce the problem you ran into. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided within a reasonable time-frame, the issue will be closed. + Please provide a link to a repo or StackBlitz that can reproduce the problem you ran into. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided within a reasonable time-frame, the issue will be closed. placeholder: Reproduction validations: required: true diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 262150c..7788079 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -11,7 +11,7 @@ on: jobs: build-preview: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 @@ -30,4 +30,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: preview-build - path: sites/docs/.svelte-kit/cloudflare + path: docs/.svelte-kit/cloudflare diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2183865..0c2c6bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,18 @@ on: push: branches: - main + - next + paths-ignore: + - ".changeset/**" + - README.md + - ".vscode/**" + - CHANGELOG.md pull_request: + paths-ignore: + - ".changeset/**" + - README.md + - ".vscode/**" + - CHANGELOG.md concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.sha }} @@ -13,7 +24,7 @@ concurrency: jobs: Check: name: Run svelte-check - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 @@ -29,7 +40,7 @@ jobs: run: pnpm check Lint: - runs-on: ubuntu-latest + runs-on: macos-latest name: Lint steps: - uses: actions/checkout@v4 @@ -42,22 +53,4 @@ jobs: - name: Install dependencies run: pnpm install - - name: Lint - run: pnpm lint - - Test: - name: Test - 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 - - - name: Install dependencies - run: pnpm install - - - name: Test - run: pnpm test + - run: pnpm lint diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index d61b2cd..9fbf454 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -14,7 +14,7 @@ permissions: jobs: deploy-preview: - runs-on: ubuntu-latest + runs-on: macos-latest if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Download build artifact diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index c82b2d6..030ec10 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -4,12 +4,13 @@ on: branches: - main paths: - - sites/docs/** + - docs/** - packages/formsnap/** + workflow_dispatch: jobs: deploy-production: - runs-on: ubuntu-latest + runs-on: macos-latest permissions: contents: read deployments: write @@ -36,5 +37,5 @@ jobs: githubToken: ${{ secrets.GITHUB_TOKEN }} projectName: formsnap directory: ./.svelte-kit/cloudflare - workingDirectory: sites/docs + workingDirectory: docs deploymentName: Production diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml new file mode 100644 index 0000000..617ff99 --- /dev/null +++ b/.github/workflows/preview-release.yml @@ -0,0 +1,28 @@ +name: Publish Preview Release +on: + pull_request: + types: [ready_for_review, synchronize, opened, labeled] + paths: [packages/**] + +jobs: + preview-release: + if: github.repository == 'svecosystem/formsnap' && contains(github.event.pull_request.labels.*.name, 'publish:preview') + timeout-minutes: 5 + runs-on: macos-latest + 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: build + run: pnpm build:packages + + - name: publish preview + run: | + pnpx pkg-pr-new@0.0 publish --pnpm --compact './packages/*' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3688810..d864b6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,11 @@ jobs: contents: write # to create release (changesets/action) pull-requests: write # to create pull request (changesets/action) name: Release - runs-on: ubuntu-latest + runs-on: macos-latest steps: - - name: Checkout Repo - uses: actions/checkout@v4 + - 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: @@ -35,8 +32,6 @@ jobs: id: changesets uses: changesets/action@v1 with: - commit: "chore(release): version package" - title: "chore(release): version package" publish: pnpm ci:publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}