Com #109
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
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
#runs-on: ubuntu-20.04 | |
#runs-on: windows-latest | |
#runs-on: macos-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Install Julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.10' | |
#version: 'nightly' | |
# GMT + ghostscript deps | |
#- run: brew install ghostscript | |
#- run: echo $(gmt --version) | |
#- run: sudo apt-get install ghostscript | |
#- name: Install Ghostscript (Windows) | |
#run: > | |
#choco install ghostscript wget | |
#- run: wget http://fct-gmt.ualg.pt/gmt/data/wininstallers/gmt-win64.exe | |
#- run: cmd /k gmt-win64.exe /S | |
- run: julia -e ' | |
using Pkg; | |
Pkg.activate("."); | |
Pkg.instantiate(); | |
Pkg.add(PackageSpec(name="GMT", rev="master")); | |
using NodeJS; | |
run(`$(npm_cmd()) install highlight.js`); | |
run(`$(npm_cmd()) install cheerio`); | |
run(`$(npm_cmd()) install lunr`); | |
using Franklin; | |
serve(single=true, cleanup=false); | |
isfile("robots.txt") && rm("robots.txt"); | |
lunr(); | |
optimize(minify=false, prerender=false);' | |
- name: Build and Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: __site |