Skip to content

Commit ec40d03

Browse files
committed
Docs: add automation
1 parent 31e8a2d commit ec40d03

3 files changed

Lines changed: 98 additions & 0 deletions

File tree

.github/WikiLinks.exe

1.83 MB
Binary file not shown.

.github/workflows/publish-wiki.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish wiki
2+
on:
3+
push:
4+
branches: [core-docs]
5+
workflow_dispatch:
6+
concurrency:
7+
group: publish-wiki
8+
cancel-in-progress: true
9+
permissions:
10+
contents: write
11+
jobs:
12+
publish-wiki:
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Remove level 1 headings from Markdown files
17+
shell: bash
18+
run: |
19+
find docs/ -name '*.md' -exec sed -i '1d' {} \;
20+
- name: Move all files to root folder
21+
shell: bash
22+
run: |
23+
mv docs/*/* docs/
24+
- name: Delete unwanted files
25+
shell: bash
26+
run: |
27+
# rm docs/*.xlsm
28+
# rm docs/*.pptx
29+
rm docs/*.shproj
30+
- name: Stripping file extensions....
31+
uses: softworkz/strip-markdown-extensions-from-links-action@main
32+
with:
33+
path: ./docs/
34+
- name: Copy images to wiki/wiki folder
35+
shell: bash
36+
run: |
37+
mkdir docs/wiki
38+
cp docs/*.svg docs/wiki/ 2>/dev/null || true
39+
cp docs/*.png docs/wiki/ 2>/dev/null || true
40+
cp docs/*.jpg docs/wiki/ 2>/dev/null || true
41+
cp docs/*.gif docs/wiki/ 2>/dev/null || true
42+
cp docs/*.mp4 docs/wiki/ 2>/dev/null || true
43+
- name: Commit and push changes
44+
run: |
45+
git config --global user.name "GitHub Action"
46+
git config --global user.email "action@github.com"
47+
git add -A
48+
git commit -m "Automatically update Markdown files" || echo "No changes to commit"
49+
- uses: Andrew-Chen-Wang/github-wiki-action@v4.4.0
50+
with:
51+
path: docs/
52+
ignore: |
53+
'**/*.xlsm'
54+
'**/*.pptx'
55+
'**/*.shproj'

.github/workflows/static.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["master"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v5
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
# Upload entire repository
40+
path: './examples'
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)