-
Notifications
You must be signed in to change notification settings - Fork 76
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
1 parent
311248d
commit 8c166d6
Showing
5 changed files
with
45 additions
and
25 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
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,32 @@ | ||
name: Links | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Vercel] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
## CHECKS ALL LINKS IN GUIDES | ||
## RUNS AFTER VERCEL LINK IS DEPLOYED | ||
check-links: | ||
name: Check Links | ||
runs-on: ubuntu-latest | ||
steps: | ||
# SETUP & INSTALL | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup-node | ||
with: | ||
install: false | ||
# RUN SCRIPT TO USE VERCEL PREVIEW LINK FROM PR | ||
- name: Update preview link | ||
run: node scripts/generate-mlc-config.mjs {{ github.head_ref }} | ||
# RUN SCRIPT TO GENERATE NEW CONFIG WITH VERCEL PREVIEW URL | ||
# RUN LINK CHECK | ||
- uses: gaurav-nelson/github-action-markdown-link-check | ||
with: | ||
config-file: 'mlc-config.json' | ||
file-extension: 'mdx' | ||
# use-verbose-mode: 'yes' | ||
folder-path: docs/guides/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import fs from 'fs'; | ||
|
||
main(); | ||
|
||
function main() { | ||
const configPath = './mlc-config-test.json'; | ||
const branchName = process.argv[2].replaceAll('/', '-').toLowerCase(); | ||
console.log('BRANCH NAME:', branchName); | ||
const configFile = fs.readFileSync(configPath, 'utf-8'); | ||
const newContent = configFile.replace('{{BRANCH}}', branchName); | ||
fs.writeFileSync(configPath, newContent); | ||
} |
This file was deleted.
Oops, something went wrong.