-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Reusable pmndrs/docs workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
mdx: | ||
required: true | ||
type: string | ||
libname: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-job: | ||
runs-on: ubuntu-latest | ||
|
||
# container: | ||
# image: ghcr.io/pmndrs/playwright:main | ||
# credentials: | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: configurepages | ||
uses: actions/configure-pages@v5 | ||
- run: | | ||
set -ex | ||
docker run --rm --init \ | ||
-v "$MDX":/app/docs \ | ||
-e BASE_PATH \ | ||
-e DIST_DIR=docs/out \ | ||
-e MDX \ | ||
-e NEXT_PUBLIC_NAME \ | ||
ghcr.io/pmndrs/docs:app-router yarn build | ||
env: | ||
BASE_PATH: ${{ steps.configurepages.outputs.base_path }} | ||
MDX: ${{ inputs.mdx }} | ||
NEXT_PUBLIC_LIBNAME: ${{ inputs.libname }} | ||
- run: ls -al ${{ inputs.mdx }} | ||
|
||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ${{ inputs.mdx }}/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Create and publish a multi-arch Docker image | ||
on: | ||
push: | ||
branches: ['main', 'app-router'] | ||
|
||
jobs: | ||
build: | ||
uses: pmndrs/docs/.github/workflows/build.yml@app-router | ||
with: | ||
mdx: ./docs | ||
libname: 'pmndrs' | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# hello | ||
|
||
this is documentation for @pmndrs/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters