Skip to content

Commit 3ace2ca

Browse files
authored
fix: input.mdx should no longer start with ./ (#312)
* chore: merging preview.yml and release.yml workflows * fix: inputs.mdx without ./ BREAKING CHANGE: `inputs.mdx` path should no longer start with `./` * chore: adding more push branches * fix: remove pull_request trigger
1 parent 9ed6731 commit 3ace2ca

File tree

5 files changed

+25
-57
lines changed

5 files changed

+25
-57
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
mdx:
77
required: true
88
type: string
9+
description: 'path to the MDX docs folder. Should be relative to the root of the repository, not starting with `./`, eg: `docs`'
910
libname:
1011
required: true
1112
type: string
@@ -67,7 +68,7 @@ jobs:
6768
set -ex
6869
6970
docker run --rm --init \
70-
-v "$MDX":/app/docs \
71+
-v "./$MDX":/app/docs \
7172
-e BASE_PATH \
7273
-e DIST_DIR="$MDX/out$BASE_PATH" \
7374
-e MDX \
@@ -90,7 +91,7 @@ jobs:
9091
-e THEME_IMPORTANT \
9192
-e THEME_WARNING \
9293
-e THEME_CAUTION \
93-
ghcr.io/pmndrs/docs:1 npm run build
94+
ghcr.io/pmndrs/docs:2 npm run build
9495
env:
9596
BASE_PATH: ${{ steps.set-base-path.outputs.BASE_PATH }}
9697
MDX: ${{ inputs.mdx }}

.github/workflows/preview.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
name: Deploy Production environment on Vercel and Publish Docker image
1+
name: Deploy on Vercel and Publish Docker image
22
on:
33
push:
4-
branches: ['main']
4+
branches:
5+
- 'main'
6+
- 'beta'
7+
- 'alpha'
8+
- 'canary-*'
59

610
env:
711
REGISTRY: ghcr.io
@@ -31,17 +35,18 @@ jobs:
3135
needs: semantic-release-job
3236
if: needs.semantic-release-job.outputs.new_release_version != ''
3337

34-
# Update the "Production" environment with the Vercel deployed URL
38+
# Update the Production/Preview environment with the Vercel deployed URL
3539
environment:
36-
name: Production
40+
name: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'Production' || 'Preview' }}
3741
url: ${{ steps.vercel-deploy.outputs.deployment_url }}
3842

3943
steps:
4044
- uses: actions/setup-node@v4
4145
- uses: actions/checkout@v4
4246
- id: vercel-deploy
4347
run: |
44-
npx -y vercel deploy --target=production --token=${{ secrets.VERCEL_TOKEN }} \
48+
npx -y vercel deploy --token=${{ secrets.VERCEL_TOKEN }} \
49+
--target=${{ github.event_name == 'push' && 'production' || 'preview' }} \
4550
--build-env MDX=docs \
4651
--build-env NEXT_PUBLIC_LIBNAME="Poimandres" \
4752
--build-env NEXT_PUBLIC_LIBNAME_SHORT="pmndrs" \

docs/getting-started/introduction.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ $ (
180180

181181
export _PORT=60141
182182

183-
export MDX=./docs
183+
export MDX=docs
184184
export NEXT_PUBLIC_LIBNAME="React Three Fiber"
185185
export NEXT_PUBLIC_LIBNAME_SHORT="r3f"
186186
export BASE_PATH=
@@ -205,7 +205,7 @@ $ (
205205
rm -rf "$MDX/out"
206206

207207
docker run --rm --init -it \
208-
-v "$MDX":/app/docs \
208+
-v "./$MDX":/app/docs \
209209
-e MDX \
210210
-e NEXT_PUBLIC_LIBNAME \
211211
-e BASE_PATH \

release.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
/** @type {import('semantic-release').GlobalConfig} */
22
const config = {
3+
branches: [
4+
'+([0-9])?(.{+([0-9]),x}).x',
5+
'master',
6+
'main',
7+
'next',
8+
'next-major',
9+
{ name: 'beta', prerelease: true },
10+
{ name: 'alpha', prerelease: true },
11+
{ name: 'canary-*', prerelease: true },
12+
],
313
plugins: [
414
'@semantic-release/commit-analyzer',
515
'@semantic-release/release-notes-generator',

0 commit comments

Comments
 (0)