Skip to content

Commit

Permalink
Add workflow to build Cocoda and deploy to GH Pages as a test (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Feb 3, 2022
1 parent 32ffbb8 commit b82849e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build
on:
push:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16.x
# Install Pandoc
- run: sudo apt update && sudo apt install -y pandoc
# Install npm deps and build Cocoda with docs
- run: npm ci
- run: npm run build
# Adjust folder structure for GitHub Pages deployment
- run: mv dist cocoda
- run: mkdir dist-docs
- run: cp docs/index.md dist-docs/
- run: cp -R cocoda dist-docs/dev
- run: zip -r "cocoda-$(git describe --tags).zip" cocoda
- run: mv "cocoda-$(git describe --tags).zip" dist-docs/
# Deploy to GitHub Pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./dist-docs

0 comments on commit b82849e

Please sign in to comment.