-
Notifications
You must be signed in to change notification settings - Fork 8
75 lines (63 loc) · 1.94 KB
/
part_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
64
65
66
67
68
69
70
71
72
73
74
75
on:
workflow_call:
inputs:
releaseName:
required: false
type: string
name: "Documentation"
env:
BUILD_EMBEDDED: true
jobs:
generate:
name: "Generate"
runs-on: ubuntu-latest
env:
MIX_ENV: dev
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-elixir@v1
id: setupBEAM
with:
version-file: '.tool-versions'
version-type: strict
- uses: actions/cache@v3
with:
path: deps
key: deps-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ steps.setupBEAM.outputs.elixir-version }}-${{ hashFiles('mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ steps.setupBEAM.outputs.elixir-version }}-
- run: mix deps.get
- uses: actions/cache@v3
with:
path: _build/dev
key: compile-${{ env.MIX_ENV }}-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ steps.setupBEAM.outputs.elixir-version }}-${{ hashFiles('mix.lock') }}
restore-keys: |
compile-${{ env.MIX_ENV }}-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ steps.setupBEAM.outputs.elixir-version }}-
- run: mix deps.compile
- run: mix compile --warning-as-errors
- run: mix docs
- uses: actions/upload-artifact@v3
with:
name: docs
path: doc
upload:
name: "Upload"
runs-on: ubuntu-latest
if: ${{ inputs.releaseName }}
needs: ['generate']
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: docs
path: docs
- run: |
tar -czvf docs.tar.gz docs
- name: Upload
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload --clobber "${{ inputs.releaseName }}" \
docs.tar.gz