-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docusaurus: start work on more github actions (#5809)
* add name for Lost Pixel GHA * First crack at spellcheck. Resolves DA-52 * backport files from main to make transition easier * first try at changed files. Resolves DA-49
- Loading branch information
Showing
11 changed files
with
348 additions
and
2 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
content/* @prisma/dev-advocates-write |
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 @@ | ||
blank_issues_enabled: false |
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,6 @@ | ||
--- | ||
name: ✍ Documentation request or bug | ||
about: Report a content issue (incorrect content, spelling mistake, broken link), request new content, or suggest an improvement. | ||
labels: 'docs' | ||
assignees: '' | ||
--- |
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,5 @@ | ||
--- | ||
name: ✨ Doc site request or bug | ||
about: Request a website feature or improvement, or report a bug. For documentation, please use documentation request. | ||
labels: 'website' | ||
--- |
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,18 @@ | ||
--- | ||
name: 🎉 Documentation release | ||
about: INTERNAL ONLY. Documentation release tasks. | ||
title: 'Release:' | ||
labels: 'docs,docs/task' | ||
assignees: '' | ||
--- | ||
|
||
## Release | ||
|
||
- [ ] Merge in new content | ||
- [ ] Update 'What's new' page with links to the release notes and new docs (example: https://www.prisma.io/docs/about/whats-new-in-prisma-docs#april-04-2021) | ||
- [ ] Add links to release notes | ||
|
||
## After release | ||
|
||
- [ ] Add the 'What's new' video | ||
- [ ] Clean up milestone |
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,62 @@ | ||
name: List Changed Pages | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- docusaurus | ||
paths: | ||
- 'content/**/*' | ||
|
||
jobs: | ||
post-files-changed-comment: | ||
name: 'Docs: Spellcheck' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get all changed markdown files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: content/**/*.{md,mdx} | ||
|
||
- name: Build comment body | ||
id: build-comment-body | ||
env: | ||
CHANGED_FILES: ${{ steps.changed-files.outputs.any_changed }} | ||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
run: | | ||
OUTPUT="" | ||
if [ ${CHANGED_FILES} == 'true' ]; then | ||
OUTPUT="| original | preview |%0A| ------ | ------ |%0A" | ||
for file in ${ALL_CHANGED_FILES} | ||
do | ||
OUTPUT+="| ${file} | |%0A" | ||
done | ||
else | ||
OUTPUT="No files changed." | ||
fi | ||
echo "::set-output name=body::$OUTPUT" | ||
- name: Find existing comment | ||
uses: peter-evans/find-comment@v1 | ||
id: find-existing | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: 'original | preview' | ||
|
||
- name: Create comment | ||
if: steps.find-existing.outputs.comment-id == '' | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: ${{ steps.build-comment-body.outputs.body }} | ||
|
||
- name: Update comment | ||
if: steps.find-existing.outputs.comment-id != '' | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
comment-id: ${{ steps.find-existing.outputs.comment-id }} | ||
body: ${{ steps.build-comment-body.outputs.body }} | ||
edit-mode: replace |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
name: 'Lost Pixel' | ||
on: [push] | ||
|
||
jobs: | ||
|
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,74 @@ | ||
#!/bin/bash | ||
|
||
body="This PR probably requires the following redirects to be added to vercel.json:%0A%0A" | ||
no_changed_pages="%0A- This PR does not change any pages in a way that would require a redirect." | ||
|
||
echo $GITHUB_BASE_REF | ||
git status -s | ||
git fetch | ||
git reset --soft origin/$GITHUB_BASE_REF | ||
git status -s | ||
status=$(git status -s) | ||
|
||
while IFS= read -r line | ||
do | ||
# Split line into parts | ||
IFS=' ' | ||
read -ra values <<< "$line" | ||
# for value in "${values[@]}"; do | ||
# echo "$value" | ||
# done | ||
|
||
# Skip if line does not indicate modification or rename | ||
if [[ "${values[0]}" != "D" && "${values[0]}" != "R" ]]; then | ||
continue | ||
fi | ||
|
||
# Delete msg for no edited pages and start code block | ||
if [ -n "$no_changed_pages" ]; then | ||
no_changed_pages="" | ||
body="$body""\`\`\`%0A" | ||
fi | ||
|
||
# name pieces (and replace `/index` from files (to get to a filename that would be equivalent)) | ||
action=${values[0]} | ||
path1=$(echo "${values[1]}" | sed -e 's#/index##g' ) | ||
path2=$(echo "${values[3]}" | sed -e 's#/index##g' ) | ||
|
||
# Skip if file names are identical (probably via `/index` replacement above) | ||
if [[ "$path1" == "$path2" ]]; then | ||
continue | ||
fi | ||
|
||
# clean paths | ||
path1_cleaned=$(echo "$path1" | sed -E 's:content/:/:g' | sed -e 's/.mdx//g' | sed -E 's:/[0-9]+-:/:g' ) | ||
path2_cleaned=$(echo "$path2" | sed -E 's:content/:/:g' | sed -e 's/.mdx//g' | sed -E 's:/[0-9]+-:/:g' ) | ||
|
||
# special case for deletion | ||
if [[ "${values[0]}" == "D" ]]; then | ||
path2_cleaned="/##( TODO: Path of page that replaces deleted page )##" | ||
fi | ||
|
||
redirect=$(cat <<-END | ||
{ | ||
"source": "/docs$path1_cleaned", | ||
"destination": "/docs$path2_cleaned" | ||
}, | ||
END | ||
) | ||
echo $redirect | ||
echo "" | ||
body="$body$redirect%0A" | ||
|
||
#echo "foo" | ||
|
||
|
||
done < <(printf '%s\n' "$status") | ||
|
||
body="$body$no_changed_pages" | ||
body=$(echo "$body" | sed ':a;N;$!ba;s/\n/%0A/g') | ||
echo $body | ||
|
||
echo "::set-output name=body::$body" | ||
|
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,28 @@ | ||
name: Documentation Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'content/**/*' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'content/**/*' | ||
jobs: | ||
spellcheck: | ||
name: 'Docs: Spellcheck' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install cSpell | ||
run: npm install -g cspell | ||
|
||
- name: Run cSpell | ||
run: cspell --config ./cSpell.json "content/**/*.mdx" --no-progress |
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,152 @@ | ||
{ | ||
"version": "0.2", | ||
"language": "en", | ||
"words": [ | ||
"Amplication", | ||
"Autoincrementing", | ||
"baselined", | ||
"Baselining", | ||
"cockroachdb", | ||
"codemod", | ||
"codemods", | ||
"datamodel", | ||
"datasource", | ||
"earlyaccess", | ||
"ecommerce", | ||
"Fastify", | ||
"fulltext", | ||
"Hasura", | ||
"hotfix", | ||
"hotfixing", | ||
"idempotency", | ||
"InnoDB", | ||
"ISAM", | ||
"livestream", | ||
"microservices", | ||
"Middlewares", | ||
"MSSQLSERVER", | ||
"neovim", | ||
"Nestjs", | ||
"Overfetching", | ||
"pgbouncer", | ||
"planetscale", | ||
"pooler", | ||
"poolers", | ||
"preconfigure", | ||
"preconfigured", | ||
"Quickstart", | ||
"refactorings", | ||
"roadmap", | ||
"signup", | ||
"sqlserver", | ||
"TLDR", | ||
"triaging", | ||
"upsert", | ||
"upserts", | ||
"upvote", | ||
"walkthrough", | ||
"healthcheck", | ||
"runtimes", | ||
"substep", | ||
"substeps", | ||
"Supabase", | ||
"Redistributable", | ||
"Nuxt", | ||
"Sveltekit", | ||
"Pothos", | ||
"backoff", | ||
"Replibyte", | ||
"Snaplet", | ||
"Kysely", | ||
"Turso", | ||
"autocompletions", | ||
"Formbricks", | ||
"Openform", | ||
"Documenso", | ||
"Docusign", | ||
"ghostfolio", | ||
"Scholarsome", | ||
"Dittofeed", | ||
"Webstudio", | ||
"Dyrector", | ||
"Coolify", | ||
"hostable", | ||
"Rallly", | ||
"Dundring", | ||
"Letterpad", | ||
"Hitori", | ||
"Zenstack" | ||
], | ||
"ignoreWords": [ | ||
"Ania", | ||
"Koyeb", | ||
"Neward", | ||
"nikolasburk", | ||
"Slonik", | ||
"Superstruct", | ||
"Tottem", | ||
"tsdf", | ||
"Typebot", | ||
"umami", | ||
"Vitess", | ||
"libgcc", | ||
"libc", | ||
"Distroless", | ||
"Nikolas", | ||
"Supavisor", | ||
"inshellisense", | ||
"janedoe" | ||
], | ||
"patterns": [ | ||
{ | ||
"name": "Markdown links", | ||
"pattern": "\\((.*)\\)", | ||
"description": "" | ||
}, | ||
{ | ||
"name": "Markdown code blocks", | ||
"pattern": "/^(\\s*`{3,}).*[\\s\\S]*?^\\1/gmx", | ||
"description": "Taken from the cSpell example at https://cspell.org/configuration/patterns/#verbose-regular-expressions" | ||
}, | ||
{ | ||
"name": "Inline code blocks", | ||
"pattern": "\\`([^\\`\\r\\n]+?)\\`", | ||
"description": "https://stackoverflow.com/questions/41274241/how-to-capture-inline-markdown-code-but-not-a-markdown-code-fence-with-regex" | ||
}, | ||
{ | ||
"name": "Link contents", | ||
"pattern": "\\<a(.*)\\>", | ||
"description": "" | ||
}, | ||
{ | ||
"name": "Snippet references", | ||
"pattern": "-- snippet:(.*)", | ||
"description": "" | ||
}, | ||
{ | ||
"name": "Snippet references 2", | ||
"pattern": "\\<\\[sample:(.*)", | ||
"description": "another kind of snippet reference" | ||
}, | ||
{ | ||
"name": "Multi-line code blocks", | ||
"pattern": "/^\\s*```[\\s\\S]*?^\\s*```/gm" | ||
}, | ||
{ | ||
"name": "HTML Tags", | ||
"pattern": "<[^>]*>", | ||
"description": "Reference: https://stackoverflow.com/questions/11229831/regular-expression-to-remove-html-tags-from-a-string" | ||
} | ||
], | ||
"ignoreRegExpList": [ | ||
"Markdown links", | ||
"Markdown code blocks", | ||
"Inline code blocks", | ||
"Link contents", | ||
"Snippet references", | ||
"Snippet references 2", | ||
"Multi-line code blocks", | ||
"HTML Tags" | ||
], | ||
"ignorePaths": [] | ||
} |
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