Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploy.yml #2

Merged
merged 1 commit into from Jan 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 14 additions & 32 deletions .github/workflows/deploy.yml
@@ -1,18 +1,9 @@
name: Build and Deploy
on:
push:
# NOTE:
# For a **project** site (username.github.io/project/), push things
# to the **master** branch and make sure to set the line below to
# ` - master`; also, at the end of the file, change to `BRANCH: gh-pages`
#
# For a **personal** site (username.github.io/), push things to a **dev**
# branch and make sure to set the line below to `- dev` this is
# because for user pages GitHub pages **requires** the deployment to be
# on the master branch; also, at the end of the file, change to
# `BRANCH: master`
branches:
- dev
- main
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -21,43 +12,34 @@ jobs:
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install SSH Client
uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.FRANKLIN_PRIV }}
# NOTE
# Python is necessary for pre-rendering steps as well as to install
# matplotlib which is necessary if you intend to use PyPlot. If you do
# not, then you can remove the `run: pip install matplotlib` line.
# NOTE: Python is necessary for the pre-rendering (minification) step
- name: Install python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install matplotlib # if you use PyPlot this is needed
python-version: '3.8'
# NOTE: Here you can install dependencies such as matplotlib if you use
# packages such as PyPlot.
# - run: pip install matplotlib
- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.3.0
version: 1.5
# NOTE
# The steps below ensure that NodeJS and Franklin are loaded then it
# installs highlight.js which is needed for the prerendering step.
# installs highlight.js which is needed for the prerendering step
# (code highlighting + katex prerendering).
# Then the environment is activated and instantiated to install all
# Julia packages which may be required to successfully build your site.
#
# The last line should be `optimize()` though you may want to give it
# specific arguments, see the documentation or ?optimize in the REPL.
- run: julia -e '
using Pkg; Pkg.add(["NodeJS", "Franklin", "PyPlot", "PlotlyJS"]);
using Pkg; Pkg.activate("."); Pkg.instantiate();
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
using Franklin;
Pkg.activate("."); Pkg.instantiate();
optimize()'
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
SSH: true
# NOTE
# Set this to `BRANCH: gh-pages` for a **project** page and to
# `BRANCH: master` for a **personal** page
BRANCH: dev
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: __site