-
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
5 changed files
with
94 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,45 @@ | ||
name: Reusable pmndrs/docs workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
mdx: | ||
required: true | ||
type: string | ||
libname: | ||
required: true | ||
type: string | ||
outputs: | ||
firstword: | ||
description: 'The first output string' | ||
value: ${{ jobs.build-job.outputs.output1 }} | ||
|
||
jobs: | ||
build-job: | ||
runs-on: ubuntu-latest | ||
|
||
# container: | ||
# image: ghcr.io/pmndrs/playwright:main | ||
# credentials: | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
outputs: | ||
output1: ${{ steps.artifact-upload-step.outputs.artifact-id }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
docker run --rm --init \ | ||
-v "$MDX":/app/docs \ | ||
-e DIST_DIR=docs/out \ | ||
-e MDX \ | ||
-e NEXT_PUBLIC_NAME \ | ||
ghcr.io/pmndrs/docs:app-router yarn build | ||
env: | ||
MDX: ${{ inputs.mdx }} | ||
NEXT_PUBLIC_LIBNAME: ${{ inputs.mdx }} | ||
- id: artifact-upload-step | ||
uses: actions/upload-artifact@v4 | ||
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,31 @@ | ||
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-docs' | ||
|
||
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 | ||
with: | ||
artifact_name: ${{ needs.build.outputs.firstword }} |
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