Skip to content

node 14 for actions #79

node 14 for actions

node 14 for actions #79

# This workflow build Heta platform and share results in "dist" branch
name: Build and Share
on:
push:
branches: [ master, '*' ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
node-version: [ 14.x ]
heta-version: [ "0.6.10" ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
npm i -g https://github.com/hetalang/heta-compiler.git
#npm i -g heta-compiler@${{ matrix.heta-version }}
- name: Clean and build
run: |
rm -rf dist/*
heta build
heta build --source src/Cov19_life_cycle/cov19_life_cycle.heta
- name: Copy other files to dist
run: |
cp -f ./static/README.md ./dist/
mkdir -p ./dist/plots
cp -rf ./diagnostics/dbsolve/*.png ./dist/plots/
cp -rf ./diagnostics/simbio/*.png ./dist/plots/
cp -rf ./diagnostics/matlab/*.png ./dist/plots/
cp -rf ./diagnostics/julia/*.png ./dist/plots/
- name: Deploy to "dist" branch only for "master" and "share" pushes
if: ${{ matrix.node-version == '10.x' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/share' ) }}
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: dist # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.