Skip to content

Commit 22987c6

Browse files
committed
Replace diagram generation workflow with documentation export
- Rename generate_diagrams.yml to update_docs.yml - Export HTML documentation to docs/ folder on PR merge - Update GitHubIntegration.md requirements accordingly - Enables GitHub Pages from docs/ folder
1 parent 9f43cde commit 22987c6

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Generate Diagrams and Traces SVG on PR Merge
1+
name: Update Documentation on PR Merge
22

33
on:
44
pull_request:
@@ -7,40 +7,40 @@ on:
77
- main
88

99
jobs:
10-
generate-diagrams:
10+
update-docs:
1111
if: github.event.pull_request.merged == true && !startsWith(github.event.pull_request.head.ref, 'release/')
12-
name: Generate and Commit Diagrams
12+
name: Export and Update Documentation
1313
runs-on: ubuntu-latest
14-
14+
1515
permissions:
16-
contents: write # Required to commit to the repository
17-
16+
contents: write
17+
1818
steps:
1919
- name: Checkout Repository
2020
uses: actions/checkout@v4
2121
with:
22-
ref: main # Checkout the main branch
23-
fetch-depth: 0 # Get full history for proper Git operations
24-
22+
ref: main
23+
fetch-depth: 0
24+
2525
- name: Set up Rust
2626
uses: dtolnay/rust-toolchain@stable
27-
27+
2828
- name: Cache Cargo dependencies
2929
uses: Swatinem/rust-cache@v2
30-
30+
3131
- name: Build Reqvire
3232
run: |
3333
cargo build --release
3434
cp target/release/reqvire ./reqvire
35-
35+
3636
- name: Configure Git
3737
run: |
3838
git config --global user.name "GitHub Action"
3939
git config --global user.email "actions@github.com"
40-
41-
- name: Generate Diagrams
40+
41+
- name: Export Documentation to docs folder
4242
run: |
43-
./reqvire generate-diagrams
43+
./reqvire export --output docs
4444
4545
- name: Check for Changes
4646
id: check_changes
@@ -50,10 +50,10 @@ jobs:
5050
else
5151
echo "HAS_CHANGES=false" >> $GITHUB_ENV
5252
fi
53-
53+
5454
- name: Commit and Push Changes
5555
if: env.HAS_CHANGES == 'true'
5656
run: |
5757
git add -A
58-
git commit -m "Auto-generate diagrams after PR merge to main"
58+
git commit -m "Auto-update documentation after PR merge"
5959
git push origin main

specifications/System/GitHubIntegration.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ The system shall generate detailed change logs for pull requests, summarizing mo
2222
* derivedFrom: [Integrate with GitHub Workflows](../UserStories.md#integrate-with-github-workflows)
2323
---
2424

25-
### Automate Diagram Generation
25+
### Automate Documentation Export
2626

27-
The system shall automate generation of diagrams in the GitHub workflow on PR merge event, so that the diagrams are always accessible and up-to-date.
27+
The system shall automate export of HTML documentation in the GitHub workflow on PR merge event, so that the documentation is always accessible and up-to-date for GitHub Pages.
2828

2929
#### Metadata
3030
* type: user-requirement
@@ -33,24 +33,24 @@ The system shall automate generation of diagrams in the GitHub workflow on PR me
3333
* derivedFrom: [Integrate with GitHub Workflows](../UserStories.md#integrate-with-github-workflows)
3434
---
3535

36-
### Automated Diagram Generation on PR Merge
36+
### Automated Documentation Export on PR Merge
3737

38-
The system shall implement a GitHub workflow that automatically generates and commits updated diagrams when pull requests are merged to the main branch.
38+
The system shall implement a GitHub workflow that automatically exports and commits updated HTML documentation when pull requests are merged to the main branch.
3939

4040
#### Details
4141
The GitHub workflow shall:
4242
- Be triggered only when a pull request is merged to the main branch (not on PR creation or updates)
4343
- Check out the latest code from the main branch post-merge
4444
- Build the Reqvire tool from source
45-
- Run the diagram generation process using the `--generate-diagrams` flag
46-
- Check if any diagrams have been added or modified
45+
- Run the HTML export process using `reqvire export --output docs`
46+
- Check if any documentation files have been added or modified
4747
- Commit any updated files with a standardized commit message
4848
- Push the updates back to the main branch
4949

50-
This ensures that the Mermaid diagrams in the repository are always up-to-date after changes are merged to the main branch, providing accurate visual representations of the latest model state without requiring manual intervention.
50+
This ensures that the HTML documentation in the `docs/` folder is always up-to-date after changes are merged to the main branch, providing accurate documentation for GitHub Pages without requiring manual intervention.
5151

5252
#### Relations
53-
* derivedFrom: [Automate Diagram Generation](#automate-diagram-generation)
53+
* derivedFrom: [Automate Documentation Export](#automate-documentation-export)
5454
* derivedFrom: [Automate Pull Request Validations](#automate-pull-request-validations)
55-
* satisfiedBy: [generate_diagrams.yml](../../.github/workflows/generate_diagrams.yml)
55+
* satisfiedBy: [update_docs.yml](../../.github/workflows/update_docs.yml)
5656
---

0 commit comments

Comments
 (0)