generated from DFE-Digital/govuk-rails-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.38 KB
/
build_flow_visualisation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Rebuild flow visualisation
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
- name: Install gems
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Install yarn
run: npm install yarn -g
- name: Install Graphviz
run: sudo apt install graphviz
- run: mkdir -p tmp/visualisations
- name: Build visualisation
run: |
dot -v
bundle exec rails "registration_wizard:visualise[png]"
- name: Checkout wiki code
uses: actions/checkout@v4
with:
repository: ${{github.repository}}.wiki
path: markdown
- name: Push updated visualisation to repo Wiki
run: |
cp tmp/visualisations/registration_wizard_visualisation.png markdown/visualisations/registration_wizard_visualisation.png
cd markdown
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add visualisations/registration_wizard_visualisation.png
git diff-index --quiet HEAD || git commit -m "Update flow visualisation" && git push