-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.47 KB
/
docs.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
53
54
55
56
57
58
59
60
61
62
63
name: Documentation
on:
push:
branches:
- 'trunk'
jobs:
docs:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout Code Branch
uses: actions/checkout@v2
with:
path: repo
- name: Install sodium
run: sudo apt-get update && sudo apt-get install libsodium23 libsodium-dev -y
- uses: erlef/setup-beam@v1
with:
otp-version: 22.x
elixir-version: 1.10.x
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
working-directory: repo
- name: Generate Documentation
run: mix docs
working-directory: repo
- name: Checkout Documentation Branch
uses: actions/checkout@v2
with:
ref: docs
path: docs
- name: Copy Documentation
run: |
rm -rf ./docs/docs
mv ./repo/doc ./docs/docs
- name: Commit and Push Documentation
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git diff HEAD --quiet
if [ "$?" -ne "0" ]; then
git commit -m "docs: documentation build for ${GITHUB_SHA}"
git push
else
echo "nothing to commit, working tree clean"
fi
working-directory: docs
shell: sh {0}