Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New GitHub Actions - Auto Website Publish on Release, Link Checker, Stale PR Marker #780

Merged
merged 5 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Release Website Publish'
on:
release:
types: [published]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: npx typedoc --out docs/api lib/index.ts
- run: mkdocs gh-deploy
27 changes: 27 additions & 0 deletions .github/workflows/linkcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"timeout": "5s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206],
"httpHeaders": [
{
"urls": ["https://help.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
],
"ignorePatterns": [
{
"pattern": [
"localhost"
]
},
{
"pattern": [
"127.0.0.1"
]
}
]
}
28 changes: 28 additions & 0 deletions .github/workflows/markdown-link-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Check Markdown links'
on:
push:
branches:
- main
paths:
- "**/*.md"

pull_request:
branches:
- main
paths:
- "**/*.md"

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: install markdown-link-check
run: npm install -g [email protected]
- name: markdown-link-check version
run: npm list -g markdown-link-check
- name: Run markdown-link-check on MD files
run: find docs -name "*.md" | xargs -n 1 markdown-link-check -q -c .github/workflows/linkcheck.json
33 changes: 33 additions & 0 deletions .github/workflows/stale_issue_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Stale issues & PR handler'
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@main
id: stale
with:
ascending: true
close-issue-message: 'Issue closed due to inactivity.'
close-pr-message: 'Pull request closed due to inactivity.'
days-before-close: 60
days-before-stale: 90
stale-issue-label: stale
stale-pr-label: stale
# Not stale if have this labels
exempt-issue-labels: 'bug,enhancement,"feature request"'
exempt-pr-labels: 'bug,enhancement'
operations-per-run: 100
stale-issue-message: |
This issue has been automatically marked as stale because it has been open 60 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days
stale-pr-message: |
This PR has been automatically marked as stale because it has been open 60 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days