Skip to content

Commit 6add707

Browse files
committed
add in core & flutter workflows
1 parent db45ec9 commit 6add707

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: docbot
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
update-docs:
9+
10+
runs-on: ubuntu-latest
11+
container:
12+
image: google/dart:latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install dependencies
16+
run: pub get
17+
- name: Generate Documentation
18+
run: dartdoc
19+
- name: Push Documentation
20+
run: |
21+
mkdir doc-src && git clone https://github.com/tmthecoder/docs doc-src
22+
cd doc-src
23+
echo "docs.tmthecoder.dev" > CNAME
24+
git config user.name "Docbot"
25+
git config user.email "[email protected]"
26+
if [ -d dargon2_core/ ]; then rm -Rf dargon2_core/; fi
27+
cp -R ../doc/api dargon2_core/
28+
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/tmthecoder/docs
29+
git add .
30+
git commit -m "Updated documentation for dargon2_core" --allow-empty
31+
git push secure-origin main
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: docbot
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
update-docs:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Cache Flutter dependencies
17+
uses: actions/cache@v2
18+
with:
19+
path: /opt/hostedtoolcache/flutter
20+
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
21+
- uses: subosito/[email protected]
22+
with:
23+
channel: 'stable' # Currently you have to use beta channel for Flutter web.
24+
- name: Upgrade flutter
25+
run: flutter upgrade
26+
- name: Install dependencies
27+
run: |
28+
cd dargon2_flutter
29+
flutter packages get
30+
- name: Activate dartdoc
31+
run: pub global activate dartdoc
32+
- name: Generate Documentation
33+
run: |
34+
cd dargon2_flutter
35+
dartdoc
36+
- name: Push Documentation
37+
run: |
38+
mkdir doc-src && git clone https://github.com/tmthecoder/docs doc-src
39+
cd doc-src
40+
echo "docs.tmthecoder.dev" > CNAME
41+
git config user.name "Docbot"
42+
git config user.email "[email protected]"
43+
if [ -d dargon2_flutter/ ]; then rm -Rf dargon2_flutter/; fi
44+
cp -R ../dargon2_flutter/doc/api dargon2_flutter/
45+
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/tmthecoder/docs
46+
git add .
47+
git commit -m "Updated documentation for dargon2_flutter" --allow-empty
48+
git push secure-origin main

0 commit comments

Comments
 (0)