fix paths #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow build Heta platform and share results in "dist" branch | |
name: Build and Share | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
branches: [ master, share ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Install and build | |
run: | | |
npm i -g heta-compiler@latest | |
heta build | |
- name: Set up R 3.6 | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '3.6' | |
- name: Run R code | |
run: | | |
Rscript -e 'install.packages(c("lattice", "mrgsolve"));' | |
Rscript ./R/run-mrgsolve.R | |
- name: Julia install | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.9' | |
- name: HetaSimulator install | |
run: | | |
julia -e 'using Pkg; Pkg.add("HetaSimulator"); Pkg.add("Plots")' | |
pwd | |
julia ./julia/run.jl | |
- name: Copy distributive files to dist directory | |
run: | | |
cp -f ./static/index.md ./dist/ | |
cp ./julia-plot-1.png ./dist/ | |
cp ./julia-plot-2.png ./dist/ | |
tar -zcf ./dist/matlab.tar.gz -C ./dist/matlab . | |
tar -zcf ./dist/simbio.tar.gz -C ./dist/simbio . | |
tar -zcf ./dist/julia.tar.gz -C ./dist/julia . | |
tar -zcf ./dist/mrg.tar.gz -C ./dist/mrg . | |
- name: Deploy to "dist" branch only for "master" and "share" pushes | |
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/share' ) }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages # The branch the action should deploy to. | |
folder: dist # The folder the action should deploy. | |
clean: true |