Skip to content

First structure for the website #2

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

Merged
merged 21 commits into from
Dec 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/DeployPage.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and Deploy
on:
push:
branches:
- dev
pull_request:
branches:
- dev
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
# NOTE: Python is necessary for the pre-rendering (minification) step
- name: Fix URLs for PR preview deployment (pull request previews)
if: github.event_name == 'pull_request'
run: |
echo "JULIAGP_FRANKLIN_WEBSITE_URL=https://juliagps.netlify.app/previews/PR${{ github.event.number }}/" >> $GITHUB_ENV
echo "JULIAGP_FRANKLIN_PREPATH=previews/PR${{ github.event.number }}" >> $GITHUB_ENV
- run: echo $JULIAGP_FRANKLIN_WEBSITE_URL
- run: echo $JULIAGP_FRANKLIN_PREPATH
- name: Install python
uses: actions/setup-python@v2
with:
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.5
# NOTE
# The steps below ensure that NodeJS and Franklin are loaded then it
# 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"]);
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
using Franklin;
Pkg.activate("."); Pkg.instantiate();
optimize()'
- name: Deploy (preview)
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name # if this build is a PR build and the PR is NOT from a fork
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-preview
FOLDER: __site
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_FOLDER: "previews/PR${{ github.event.number }}"
- name: Deploy (main)
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: master
FOLDER: __site
14 changes: 14 additions & 0 deletions .github/workflows/pr_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR Comment # Write a comment in the PR with a link to the preview of the given website
on:
pull_request:
types: [opened, reopened]
jobs:
pr_comment:
runs-on: ubuntu-latest
steps:
- name: Create PR comment
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name # if this is a pull request build AND the pull request is NOT made from a fork
uses: thollander/actions-comment-pull-request@71efef56b184328c7ef1f213577c3a90edaa4aff
with:
message: 'Once the build has completed, you can preview your PR at this URL: https://juliagps.netlify.app/previews/PR${{ github.event.number }}/'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
page/__site
__site
.vscode
Loading