Skip to content

Commit 0543662

Browse files
committed
make one unified workflow for docbot
1 parent 410615d commit 0543662

File tree

5 files changed

+109
-136
lines changed

5 files changed

+109
-136
lines changed

.github/workflows/dargon2_core_docbot.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/dargon2_docbot.yml

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: docbot (dargon2)
1+
name: docbot
22

33
on:
44
push:
55
branches: [ main ]
66

7-
defaults:
8-
run:
9-
working-directory: dargon2
10-
117
jobs:
12-
update-docs:
13-
8+
# Job to update the documentation on docs.tmthecoder.dev for dargon2
9+
update-docs-dargon2:
10+
defaults:
11+
run:
12+
working-directory: dargon2
1413
runs-on: ubuntu-latest
1514
container:
1615
image: google/dart:latest
@@ -33,3 +32,104 @@ jobs:
3332
git add .
3433
git commit -m "Updated documentation for dargon2" --allow-empty
3534
git push secure-origin main
35+
36+
# Job to update the documentation on docs.tmthecoder.dev for dargon2_core
37+
update-docs-dargon2_core:
38+
needs: [ update-docs-dargon2 ]
39+
defaults:
40+
run:
41+
working-directory: dargon2_core
42+
runs-on: ubuntu-latest
43+
container:
44+
image: google/dart:latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Install dependencies
48+
run: pub get
49+
- name: Generate Documentation
50+
run: dartdoc
51+
- name: Push Documentation
52+
run: |
53+
mkdir doc-src && git clone https://github.com/tmthecoder/docs doc-src
54+
cd doc-src
55+
echo "docs.tmthecoder.dev" > CNAME
56+
git config user.name "Docbot"
57+
git config user.email "[email protected]"
58+
if [ -d dargon2_core/ ]; then rm -Rf dargon2_core/; fi
59+
cp -R ../doc/api dargon2_core/
60+
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/tmthecoder/docs
61+
git add .
62+
git commit -m "Updated documentation for dargon2_core" --allow-empty
63+
git push secure-origin main
64+
65+
# Job to update the documentation on docs.tmthecoder.dev for dargon2_interface
66+
update-docs-dargon2_interface:
67+
needs: [update-docs-dargon2_core]
68+
defaults:
69+
run:
70+
working-directory: dargon2_interface
71+
runs-on: ubuntu-latest
72+
container:
73+
image: google/dart:latest
74+
steps:
75+
- uses: actions/checkout@v2
76+
- name: Install dependencies
77+
run: pub get
78+
- name: Generate Documentation
79+
run: dartdoc
80+
- name: Push Documentation
81+
run: |
82+
mkdir doc-src && git clone https://github.com/tmthecoder/docs doc-src
83+
cd doc-src
84+
echo "docs.tmthecoder.dev" > CNAME
85+
git config user.name "Docbot"
86+
git config user.email "[email protected]"
87+
if [ -d dargon2_interface/ ]; then rm -Rf dargon2_interface/; fi
88+
cp -R ../doc/api dargon2_interface/
89+
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/tmthecoder/docs
90+
git add .
91+
git commit -m "Updated documentation for dargon2_interface" --allow-empty
92+
git push secure-origin main
93+
94+
# Job to update the documentation on docs.tmthecoder.dev for dargon2_flutter
95+
update-docs-dargon2_flutter:
96+
needs: [update-docs-dargon2_interface]
97+
defaults:
98+
run:
99+
working-directory: dargon2_flutter
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@v2
103+
- name: Cache Flutter dependencies
104+
uses: actions/cache@v2
105+
with:
106+
path: /opt/hostedtoolcache/flutter
107+
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
108+
- uses: subosito/[email protected]
109+
with:
110+
channel: 'stable' # Currently you have to use beta channel for Flutter web.
111+
- name: Upgrade flutter
112+
run: flutter upgrade
113+
- name: Install dependencies
114+
run: |
115+
cd dargon2_flutter
116+
flutter packages get
117+
- name: Activate dartdoc
118+
run: pub global activate dartdoc
119+
- name: Generate Documentation
120+
run: |
121+
cd dargon2_flutter
122+
dartdoc
123+
- name: Push Documentation
124+
run: |
125+
mkdir doc-src && git clone https://github.com/tmthecoder/docs doc-src
126+
cd doc-src
127+
echo "docs.tmthecoder.dev" > CNAME
128+
git config user.name "Docbot"
129+
git config user.email "[email protected]"
130+
if [ -d dargon2_flutter/ ]; then rm -Rf dargon2_flutter/; fi
131+
cp -R ../dargon2_flutter/doc/api dargon2_flutter/
132+
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/tmthecoder/docs
133+
git add .
134+
git commit -m "Updated documentation for dargon2_flutter" --allow-empty
135+
git push secure-origin main

.github/workflows/dargon2_flutter_docbot.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/dargon2_interface_docbot

Lines changed: 0 additions & 35 deletions
This file was deleted.

.idea/workspace.xml

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)