Skip to content

Merge pull request #118 from nwalsh1995/main #153

Merge pull request #118 from nwalsh1995/main

Merge pull request #118 from nwalsh1995/main #153

Workflow file for this run

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