Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hokkanen committed Apr 15, 2024
2 parents db93618 + e66fe61 commit 7c0a77d
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 9 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pages-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy HTML slides to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
pages-html:
uses: ./.github/workflows/pages.yml
with:
include_pdf: false
17 changes: 17 additions & 0 deletions .github/workflows/pages-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Deploy HTML and PDF slides to Pages

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
pages-pdf:
uses: ./.github/workflows/pages.yml
with:
include_pdf: true
44 changes: 37 additions & 7 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
name: Deploy slides to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_call:
inputs:
include_pdf:
required: true
type: boolean

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -23,23 +22,38 @@ concurrency:

jobs:
build:
timeout-minutes: 30
runs-on: ubuntu-latest
container:
image: ghcr.io/csc-training/slidefactory:3.0.0-beta.5
image: ghcr.io/csc-training/slidefactory:3.0.0-beta.9
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build slides
env:
INCLUDE_PDF: ${{ inputs.include_pdf }}
run: |
SLIDE_ZIP=slides.zip
git config --global --add safe.directory $PWD
GIT_DATE=$(git show -s --format=%ci $GITHUB_SHA)
echo "Updated on $GIT_DATE ([$GITHUB_SHA]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA))" >> index.md
echo "" >> index.md
mkdir build
mkdir -p build/theme/csc-plain
cp /slidefactory/theme/csc-plain/csc.css build/theme/csc-plain/
cp -r /slidefactory/theme/csc-plain/img build/theme/csc-plain/
if [[ "$INCLUDE_PDF" == "true" ]]; then
echo "[Download a zip file containing all slides]($SLIDE_ZIP)" >> index.md
echo "" >> index.md
fi
for d in \
intro-to-hpc \
computer-platforms \
Expand All @@ -55,12 +69,28 @@ jobs:
echo "## $d" >> index.md
/slidefactory/slidefactory.py --format html $d/docs/*.md -o build/$d/ --theme_url ../theme/csc-plain/csc.css
if [[ "$INCLUDE_PDF" == "true" ]]; then
/slidefactory/slidefactory.py --format pdf $d/docs/*.md -o build/$d/
fi
for f in build/$d/*.html; do
echo "* [${f##*/}](${f#build/}){target=\"_blank\"}" >> index.md
if [[ "$INCLUDE_PDF" == "true" ]]; then
f_pdf=${f%.*}.pdf
echo " ([PDF](${f_pdf#build/}){target=\"_blank\"})" >> index.md
fi
done
echo "" >> index.md
done
if [[ "$INCLUDE_PDF" == "true" ]]; then
cd build
zip $SLIDE_ZIP */*.pdf
cd -
fi
cat index.md
pandoc --standalone --metadata title="CSC Summer School in High-Performance Computing" index.md -o build/index.html
rm index.md
Expand Down
4 changes: 2 additions & 2 deletions gpu-openmp/docs/01-GPU-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CPU - manycores
</div>

<div class="column">
![ <span style=" font-size:0.5em;">image credits: Nemez @GPUsAreMagic https://nemez.net/die/RocketLake</span> ](img/core_die_shot.jpg){width=57%}
![ <span style=" font-size:0.5em;">image credits: Nemez @GPUsAreMagic https://nemez.net/die/RocketLake</span> ](img/core_die_shot_small.jpg){width=57%}

</div>

Expand All @@ -135,7 +135,7 @@ CPU - manycores


<div class="column">
![ <span style=" font-size:0.5em;">image credits: Nemez @GPUsAreMagic https://nemez.net/die/Ampere</span> ](img/gpu_die_shot.jpg){width=70%}
![ <span style=" font-size:0.5em;">image credits: Nemez @GPUsAreMagic https://nemez.net/die/Ampere</span> ](img/gpu_die_shot_small.jpg){width=70%}

</div>

Expand Down
Binary file added gpu-openmp/docs/img/core_die_shot_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gpu-openmp/docs/img/gpu_die_shot_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c0a77d

Please sign in to comment.