forked from Simon-Initiative/oli-torus
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.72 KB
/
documentation.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
name: Documentation
on:
push:
branches:
- master
# manually trigger a package build from the Actions tab
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
# only deploy docs if the workflow is running on the master branch
if: github.ref == 'refs/heads/master'
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: 🔧 Setup
uses: actions/setup-node@v1
with:
node-version: "16.14.2"
- name: 🔧 Configure
run: cp oli.example.env oli.env
- name: 🧪 Setup Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: 1.17.2 # Define the elixir version [required]
otp-version: 27.0.1 # Define the OTP version [required]
- name: ⬇️ Install Elixir Dependencies
run: mix deps.get
- name: 🔨📦 Build Dependencies
run: mix deps.compile
- name: Install node_module dependencies 📦
run: npm install -g yarn && yarn --cwd assets
- name: Build client-side API markdown docs
run: yarn --cwd assets run sdk-docs
- name: 🔨📄 Build Docs
run: mix docs
- name: 🔨📖 Build client-side storybook docs
run: yarn --cwd assets run storybook:build
- name: 🚀 Deploy Docs
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: doc # The folder the action should deploy.