Skip to content

Commit

Permalink
Add diagrams and GitHub Action.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Feb 21, 2024
1 parent 2b76ff8 commit b5b86c4
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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
- 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
package-lock.json

/diagrams/*.svg
21 changes: 21 additions & 0 deletions diagrams/sutton-bulky.d2
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


0 comments on commit b5b86c4

Please sign in to comment.