-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deploy D2 documentation to pages | ||
|
||
on: | ||
push: | ||
branches: [ diagrams ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/configure-pages@v4 | ||
- name: Install packages | ||
run: curl -fsSL https://d2lang.com/install.sh | sh -s -- | ||
- name: Generate diagrams | ||
run: | | ||
for file in diagrams/*.d2; do | ||
base="${file%.*}" | ||
~/.local/bin/d2 $file _site/$base.svg -t 105 --sketch | ||
done | ||
- name: Generate index | ||
run: | | ||
echo '<ul>' > _site/diagrams/index.html | ||
for file in _site/diagrams/*; do | ||
name="${file##*/}" | ||
echo "<li><a href='$name'>$name</a></li>" >> _site/diagrams/index.html | ||
done | ||
echo '</ul>' >> _site/diagrams/index.html | ||
- uses: actions/upload-pages-artifact@v3 | ||
deploy: | ||
needs: build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
package-lock.json | ||
|
||
/diagrams/*.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Pick container: Which container do you need? | ||
Replacement: Why do you need a\nreplacement container? | ||
About you1: Summary\nEND { style.fill: lightgrey } | ||
About you2: Summary\nEND { style.fill: lightgrey } | ||
About you5: Summary\nEND { style.fill: lightgrey } | ||
why_sacks: Why do you need\nmore sacks? | ||
why_green: Why do you need a\nreplacement container? | ||
Call us: Call us\nEND { style.fill: lightgrey } | ||
|
||
Pick container -> Call us: Grey bin | ||
Pick container -> why_sacks: Clear sack | ||
Pick container -> why_green: Green bin | ||
Pick container -> Replacement: Other | ||
|
||
why_sacks -> About you1: I am a new resident\nwithout any | ||
why_sacks -> About you1: I have used all\nthe sacks provided | ||
|
||
why_green -> About you2: My container\nis damaged | ||
why_green -> About you2: My container\nis missing | ||
|
||
Replacement -> About you5: I am a new resident\nwithout a container | ||
Replacement -> About you5: My container\nis damaged | ||
Replacement -> About you5: My container\nis missing | ||
Replacement -> About you5: I would like an\nextra container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Pick container: Which container do you need? | ||
Replacement: Why do you need a\nreplacement container? | ||
Replacement2: Why do you need a\nreplacement container? | ||
Recycling swap: Would you like to replace\nyour recycling box containers\nwith a wheelie bin? | ||
Recycling swap2: Would you like to replace\nyour recycling box containers\nwith a wheelie bin? | ||
Recycling number: How many\nboxes/\ncontainers? | ||
Recycling number2: How many\nboxes/\ncontainers? | ||
Notes missing: Can you give us any\ninformation about what\nhappened to your container? | ||
Notes damaged: What happened to\nyour container? | ||
About you1: About/\nSummary/\nEND { style.fill: lightgrey } | ||
About you2: About/\nSummary/\nEND { style.fill: lightgrey } | ||
About you3: Confirm\nAbout/\nSummary/\nEND { style.fill: lightgrey } | ||
About you4: About/\nSummary/\nEND { style.fill: lightgrey } | ||
About you5: About/\nSummary/\nEND { style.fill: lightgrey } | ||
About you6: About/\nSummary/\nEND { style.fill: lightgrey } | ||
About you7: Confirm\nAbout/\nSummary/\nEND { style.fill: lightgrey } | ||
|
||
Pick container -> Replacement: Other | ||
Pick container -> Recycling swap: Recycling bin\n(don’t have a bin) | ||
Pick container -> About you1: Recycling blue stripe bag\nor Paper single use bag | ||
Pick container -> Replacement2: Recycling box | ||
|
||
Replacement2 -> Recycling number2: Damaged/\nMissing | ||
Replacement2 -> Recycling number: New resident\nwithout\na container | ||
Replacement2 -> Recycling swap2: I need an additional\ncontainer/bin | ||
|
||
Replacement -> About you2: New resident\nwithout\na container | ||
Replacement -> Notes damaged: Damaged | ||
Replacement -> Notes missing: Missing | ||
|
||
Recycling swap -> Replacement: No | ||
Recycling swap -> About you3: Yes | ||
|
||
Recycling swap2 -> Recycling number: No | ||
Recycling swap2 -> About you7: Yes | ||
|
||
Recycling number2 -> Notes damaged: Damaged | ||
Recycling number2 -> Notes missing: Missing | ||
Recycling number -> About you4 | ||
|
||
Notes missing -> About you5 | ||
Notes damaged -> About you6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
shape: sequence_diagram | ||
|
||
user: { shape: person } | ||
|
||
user -> WasteWorks: Submits\nbulky form | ||
|
||
WasteWorks.t -> Echo: PostEvent with\nevent details | ||
|
||
WasteWorks.t -> Payment\nprovider: Redirect user to\npayment provider | ||
|
||
Payment\nprovider -> WasteWorks: Redirect back after\nsuccessful payment | ||
|
||
WasteWorks."Parameters verified\nusing SHA-OUT" | ||
|
||
WasteWorks.t2 -> User: Payment confirmation screen | ||
|
||
WasteWorks.t2 -> User: Email with booking details | ||
|
||
WasteWorks.t2 -> Echo: UpdateEvent with\npayment details | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Pick container: Which container do you need? | ||
Replacement: Why do you need a\nreplacement container? | ||
About you: About/\nSummary/\nEND { style.fill: lightgrey } | ||
|
||
Pick container -> Replacement: Other | ||
Pick container -> About you: Recycling blue stripe bag\nor Paper single use bag | ||
|
||
Replacement -> About you: Damaged/\nMissing |