-
Notifications
You must be signed in to change notification settings - Fork 19
63 lines (59 loc) · 2.02 KB
/
build.yaml
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
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
environment: deploy
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies and build web components
run: |
cd wc/
npm clean-install
npm run build
ls ../static
ls ../static/assets
cd ..
- name: Install MermaidJS CLI
run: |
npm install @mermaid-js/mermaid-cli
./mmd.sh
- name: Install Zola
run: |
#sudo snap install --edge zola
curl -L https://github.com/getzola/zola/releases/download/v0.17.2/zola-v0.17.2-x86_64-unknown-linux-gnu.tar.gz -o zola.tar.gz
tar xvf zola.tar.gz
- name: Build website
run: |
./zola build
- name: Install mdbook
run: |
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.28/mdbook-v0.4.28-x86_64-unknown-linux-gnu.tar.gz -o mdbook.tar.gz
tar xvf mdbook.tar.gz
- name: Build docs
run: |
./mdbook build docs
- name: Deploy biscuitsec.org to netlify
run: |
zip -r biscuitsec.zip public
curl -H "Content-Type: application/zip" \
-H "Authorization: Bearer ${{ secrets.NETLIFY_TOKEN }}" \
--data-binary @biscuitsec.zip \
https://api.netlify.com/api/v1/sites/biscuitsec.netlify.app/deploys
- name: Deploy doc.biscuitsec.org to netlify
run: |
zip -r doc.biscuitsec.zip docs/book
curl -H "Content-Type: application/zip" \
-H "Authorization: Bearer ${{ secrets.NETLIFY_TOKEN }}" \
--data-binary @doc.biscuitsec.zip \
https://api.netlify.com/api/v1/sites/doc-biscuitsec.netlify.app/deploys