Skip to content

Commit

Permalink
Generate docs directly from the System Informer repository
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Aug 21, 2023
1 parent 8073ebc commit 554d7f3
Show file tree
Hide file tree
Showing 36 changed files with 14 additions and 43,228 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
path: main
- name: Checkout winsiderss/systeminformer
uses: actions/checkout@v3
with:
repository: winsiderss/systeminformer
path: systeminformer
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -22,11 +30,13 @@ jobs:
python -m pip install --upgrade pip
pip install markdown2 Pygments
- name: Generate docs
run: python -u generate_docs.py --path ./phnt-include --commit 8a7b8bc42f287bede29b5b2f1d43b2b071d45244
run: |
cd main
python -u generate_docs.py --path ../systeminformer/phnt/include --commit "$(git -C systeminformer rev-list HEAD -- phnt/include | head -n 1)"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_dir: ./main/docs
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
7 changes: 1 addition & 6 deletions generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,7 @@ def split_header_to_chunks(path: Path) -> List[Chunk]:
code = path.read_text()
original_newline_count = code.count('\n')

# Temporary spacial case for ntioapi.h.
if path.name == 'ntioapi.h':
code = code.replace('\t', ' ')
else:
assert '\t' not in code

assert '\t' not in code
assert '@' not in code

# Remove block comments.
Expand Down
Loading

0 comments on commit 554d7f3

Please sign in to comment.