Skip to content

Commit 42fd4ee

Browse files
committed
Start introduction notebook
1 parent 62b77ae commit 42fd4ee

File tree

7 files changed

+664
-0
lines changed

7 files changed

+664
-0
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
groups:
5+
# Group all GitHub Actions PRs into a single PR:
6+
all-github-actions:
7+
patterns:
8+
- "*"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"
12+
open-pull-requests-limit: 100
13+
labels:
14+
- "dependencies"
15+
- "github-actions"

.github/workflows/BuildPublish.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Build and Publish
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/BuildPublish.yml'
7+
- 'presentations/intro-julia'
8+
push:
9+
branches:
10+
# - main
11+
paths:
12+
- '.github/workflows/BuildPublish.yml'
13+
- 'presentations/intro-julia'
14+
workflow_dispatch:
15+
16+
concurrency:
17+
# Skip intermediate builds: all builds except for builds on the `main` branch
18+
# Cancel intermediate builds: only pull request builds
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
21+
22+
jobs:
23+
build-publish:
24+
timeout-minutes: 20
25+
26+
permissions:
27+
contents: write
28+
29+
runs-on: ubuntu-latest
30+
31+
defaults:
32+
run:
33+
shell: bash
34+
working-directory: presentations/intro-julia
35+
36+
steps:
37+
- uses: actions/checkout@v5
38+
39+
- uses: julia-actions/setup-julia@v2
40+
41+
- name: Load Julia packages from cache
42+
id: julia-cache
43+
uses: julia-actions/cache@v2
44+
45+
- name: Install dependencies
46+
shell: julia --color=yes --project {0}
47+
run: |
48+
using Pkg: Pkg
49+
Pkg.instantiate()
50+
51+
- name: Render HTML presentation
52+
# Presentation will be rendered when publishing, no need to do it twice.
53+
if: github.event_name == 'pull_request'
54+
shell: julia --color=yes --project {0}
55+
run: |
56+
using quarto_jll: quarto
57+
run(`$(quarto()) render index.qmd`)
58+
59+
- name: Configure Git
60+
if: github.event_name != 'pull_request'
61+
run: |
62+
git config user.name "${{github.actor}}"
63+
git config user.email "${{github.actor_id}}+${{github.actor}}@users.noreply.github.com"
64+
65+
- name: Render and publish HTML presentation
66+
shell: julia --color=yes --project {0}
67+
if: github.event_name != 'pull_request'
68+
run: |
69+
using quarto_jll: quarto
70+
run(`$(quarto()) publish --no-prompt --no-browser gh-pages index.qmd`)
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
74+
- name: Install TinyTeX
75+
shell: julia --color=yes --project {0}
76+
run: |
77+
using quarto_jll: quarto
78+
run(`$(quarto()) install tinytex`)
79+
80+
- name: Render PDF presentation
81+
shell: julia --color=yes --project {0}
82+
run: |
83+
using quarto_jll: quarto
84+
run(`$(quarto()) render index.qmd --to pdf`)
85+
86+
- name: Upload PDF presentation
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: pdf-presentation
90+
path: |
91+
**/index.pdf
92+
retention-days: 30
93+
94+
- name: Upload HTML presentation
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: html-presentation
98+
path: |
99+
**/index.html
100+
**/index_files
101+
retention-days: 30
102+
103+
- name: Save Julia depot cache on cancel or failure
104+
id: julia-cache-save
105+
if: cancelled() || failure()
106+
uses: actions/cache/save@v4
107+
with:
108+
path: |
109+
${{ steps.julia-cache.outputs.cache-paths }}
110+
key: ${{ steps.julia-cache.outputs.cache-key }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ Manifest*.toml
2626
# File generated by the Preferences package to store local preferences
2727
LocalPreferences.toml
2828
JuliaLocalPreferences.toml
29+
30+
# Files generated by Quarto
31+
*.html
32+
*.pdf
33+
index_files
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[deps]
2+
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
3+
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
4+
quarto_jll = "b7163347-bfae-5fd9-aba4-19f139889d78"
5+
6+
[compat]
7+
BenchmarkTools = "1.6"
8+
ChunkSplitters = "3.1"
9+
quarto_jll = "1.8"
764 KB
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*-- scss:defaults --*/
2+
3+
// Include JuliaMono font
4+
@import url("https://cdn.jsdelivr.net/gh/cormullion/juliamono-webfonts/JuliaMono-Black.woff2");
5+
6+
// fonts settings
7+
$font-family-sans-serif: 'Lato', sans-serif;
8+
$presentation-heading-font: 'Lato', sans-serif !default;
9+
$font-family-monospace: 'JuliaMono-Light', monospace !default;
10+
$presentation-heading-text-transform: none !default;

0 commit comments

Comments
 (0)