Skip to content

Commit

Permalink
fix: input.mdx should no longer start with ./ (#312)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
abernier authored Aug 29, 2024
1 parent 9ed6731 commit 3ace2ca
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 57 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
mdx:
required: true
type: string
description: 'path to the MDX docs folder. Should be relative to the root of the repository, not starting with `./`, eg: `docs`'
libname:
required: true
type: string
Expand Down Expand Up @@ -67,7 +68,7 @@ jobs:
set -ex
docker run --rm --init \
-v "$MDX":/app/docs \
-v "./$MDX":/app/docs \
-e BASE_PATH \
-e DIST_DIR="$MDX/out$BASE_PATH" \
-e MDX \
Expand All @@ -90,7 +91,7 @@ jobs:
-e THEME_IMPORTANT \
-e THEME_WARNING \
-e THEME_CAUTION \
ghcr.io/pmndrs/docs:1 npm run build
ghcr.io/pmndrs/docs:2 npm run build
env:
BASE_PATH: ${{ steps.set-base-path.outputs.BASE_PATH }}
MDX: ${{ inputs.mdx }}
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/preview.yml

This file was deleted.

15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Deploy Production environment on Vercel and Publish Docker image
name: Deploy on Vercel and Publish Docker image
on:
push:
branches: ['main']
branches:
- 'main'
- 'beta'
- 'alpha'
- 'canary-*'

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -31,17 +35,18 @@ jobs:
needs: semantic-release-job
if: needs.semantic-release-job.outputs.new_release_version != ''

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

steps:
- uses: actions/setup-node@v4
- uses: actions/checkout@v4
- id: vercel-deploy
run: |
npx -y vercel deploy --target=production --token=${{ secrets.VERCEL_TOKEN }} \
npx -y vercel deploy --token=${{ secrets.VERCEL_TOKEN }} \
--target=${{ github.event_name == 'push' && 'production' || 'preview' }} \
--build-env MDX=docs \
--build-env NEXT_PUBLIC_LIBNAME="Poimandres" \
--build-env NEXT_PUBLIC_LIBNAME_SHORT="pmndrs" \
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ $ (

export _PORT=60141

export MDX=./docs
export MDX=docs
export NEXT_PUBLIC_LIBNAME="React Three Fiber"
export NEXT_PUBLIC_LIBNAME_SHORT="r3f"
export BASE_PATH=
Expand All @@ -205,7 +205,7 @@ $ (
rm -rf "$MDX/out"

docker run --rm --init -it \
-v "$MDX":/app/docs \
-v "./$MDX":/app/docs \
-e MDX \
-e NEXT_PUBLIC_LIBNAME \
-e BASE_PATH \
Expand Down
10 changes: 10 additions & 0 deletions release.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/** @type {import('semantic-release').GlobalConfig} */
const config = {
branches: [
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'main',
'next',
'next-major',
{ name: 'beta', prerelease: true },
{ name: 'alpha', prerelease: true },
{ name: 'canary-*', prerelease: true },
],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
Expand Down

0 comments on commit 3ace2ca

Please sign in to comment.