Skip to content

Commit

Permalink
Move the docs to wiki
Browse files Browse the repository at this point in the history
Sick of having to pull after every push
  • Loading branch information
p3lim committed Jul 22, 2024
1 parent d9d2518 commit 38730b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 518 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
name: Generate docs
on: push

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Clone project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create docs directory
# lua-doc-parser should really handle this
run: |
mkdir .docs
- name: Clone wiki
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: .wiki

- name: Parse and generate docs
uses: p3lim/lua-doc-parser@v2
with:
output: .docs

- name: Inject docs into readme
run: |
ex README.md << EOF
/DOCSTART/+1,/DOCEND/-1 d
-1 r .docs/*.md
wq
EOF
output: .wiki

- name: Push docs
run: |
git config user.name 'GitHub Actions'
git config user.email [email protected]
git add README.md
git diff --quiet HEAD || git commit -m 'ci: update documentation'
cd .wiki
git config user.name CI
git config user.email "<>"
git add .
git diff --quiet HEAD || git commit -m '$GITHUB_SHA'
git push
Loading

0 comments on commit 38730b7

Please sign in to comment.