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

Auto build docs #53

Merged
merged 31 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3e7316e
remove unused file
brainwavecoder9 Oct 12, 2024
b8de637
update URL to resolve issue identified in PR #49
brainwavecoder9 Oct 12, 2024
6839b12
replace deprecated args with current versions
brainwavecoder9 Oct 12, 2024
73c3739
add workflow to generate documentation
brainwavecoder9 Oct 12, 2024
9d3628f
correct path to README artifact
brainwavecoder9 Oct 12, 2024
e88a4c9
update workflow dispatch to see if it shows in the UI
brainwavecoder9 Oct 12, 2024
fcd2dec
update to v4
brainwavecoder9 Oct 12, 2024
e538f08
updated process to automatically commit updated README
brainwavecoder9 Oct 12, 2024
aa67bbf
Auto-update: Generated README.md
actions-user Oct 12, 2024
7058055
update process to add generated static folder
brainwavecoder9 Oct 12, 2024
18d4127
Merge branch 'auto-build-docs' of github.com:brainwavecollective/nim-…
brainwavecoder9 Oct 12, 2024
a1f08f3
updated make process to only execute python scripts, not everything
brainwavecoder9 Oct 12, 2024
c238bac
Auto-update: Generated README.md
actions-user Oct 12, 2024
14ae1b7
update how output from script is captured for README
brainwavecoder9 Oct 12, 2024
12c4a1e
revert back to previous method
brainwavecoder9 Oct 12, 2024
05cdb46
Auto-update: Generated README.md
actions-user Oct 12, 2024
fca73f2
add PYTHONPATH to make process so chain import works
brainwavecoder9 Oct 12, 2024
1fadcd9
Merge branch 'auto-build-docs' of github.com:brainwavecollective/nim-…
brainwavecoder9 Oct 12, 2024
27fd324
typo
brainwavecoder9 Oct 12, 2024
a27969d
clarified commit message
brainwavecoder9 Oct 12, 2024
b1bfbc8
referenced entire code directory
brainwavecoder9 Oct 12, 2024
8d40317
Auto-generated: README.md and related content
actions-user Oct 12, 2024
5ef39dd
ensure markdown files always use lf EOL
brainwavecoder9 Oct 12, 2024
fb12f43
add name
brainwavecoder9 Oct 12, 2024
aa83ef1
update to let users know that changes will happen automatically; make…
brainwavecoder9 Oct 12, 2024
0d64408
Auto-generated: README.md and related content
actions-user Oct 12, 2024
0a6c7c0
additional clarification inspired by #24
brainwavecoder9 Oct 12, 2024
76d466b
Merge branch 'auto-build-docs' of github.com:brainwavecollective/nim-…
brainwavecoder9 Oct 12, 2024
27914bd
Auto-generated: README.md and related content
actions-user Oct 12, 2024
37fcbed
move pip dependencies into requirements file per https://github.com/N…
brainwavecoder9 Oct 17, 2024
4126330
resolved inconsistent package availability for pandoc
brainwavecoder9 Oct 17, 2024
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Normalize text files on commit to LF endings by default
* text=auto

# Enforce LF line endings for markdown files
*.md text eol=lf

# Make sure Windows batch files preserve CR/LF line endings, otherwise they may not be able to execute. Windows
# batch files require a CR/LF for labels to work properly, otherwise they may fail when labels straddle 512-byte
# block boundaries. This is important when files are downloaded through a zip archive that was authored on a
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/generate-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Generate README

on:
push:
paths:
- 'docs/**' # Trigger when files under the docs folder change
workflow_dispatch: # Also allows manual triggering from the GitHub Actions UI

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2

# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

# Step 3: Install Dependencies (Pandoc, Make, etc.)
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make wget
PANDOC_VERSION=3.1.8
wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb
sudo dpkg -i pandoc-${PANDOC_VERSION}-1-amd64.deb
python -m pip install --upgrade pip
pip install -r .github/workflows/generate-documentation_requirements.txt

# Step 4: Build Documentation
- name: Build documentation
working-directory: docs
run: make all

# Step 5: Upload README.md as an artifact for manual review
#- name: Upload README.md as artifact
# uses: actions/upload-artifact@v4
# with:
# name: generated-readme
# path: README.md # Adjust the path if necessary

# Step 6: Display the diff for review in logs
- name: Show diff for README.md
run: |
echo "Comparing differences for the updated README"
git diff README.md || echo "No differences to display"

# Step 7: Commit changes automatically
- name: Commit and push changes
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git add README.md .static
git diff --cached --exit-code || git commit -m "Auto-generated: README.md and related content"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use GitHub token for authentication
2 changes: 2 additions & 0 deletions .github/workflows/generate-documentation_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
confz==2.0.1
Jinja2>=3.0.0
Loading
Loading