Skip to content

Commit 51b9113

Browse files
Update content and CI to allow material download from the website
1 parent 5ee407d commit 51b9113

4 files changed

Lines changed: 45 additions & 2 deletions

File tree

.github/workflows/trigger-website-publishing.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ on:
44
push:
55
# Allows you to run this workflow manually from the Actions tab
66
workflow_dispatch:
7-
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
814
jobs:
915
trigger:
1016
runs-on: ubuntu-latest
@@ -24,3 +30,30 @@ jobs:
2430
-H "X-GitHub-Api-Version: 2022-11-28" \
2531
https://api.github.com/repos/$repo_owner/$repo_name/actions/workflows/$workflow_file/dispatches \
2632
-d "$json_data"
33+
34+
publish_zip:
35+
runs-on: ubuntu-latest
36+
needs: [] # Run in parallel
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
41+
- name: Zip course-material
42+
run: |
43+
cd course-material
44+
zip -r ../course-material.zip .
45+
cd ..
46+
47+
- name: Move zip to _public folder
48+
run: |
49+
mkdir -p _public
50+
mv course-material.zip _public/
51+
52+
# download UIs
53+
- name: Upload GitHub Pages Artifact
54+
uses: actions/upload-pages-artifact@v3
55+
with:
56+
path: _public
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

course-material/.gitkeep

Whitespace-only changes.

course-material/README.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
= Course material folder
2+
3+
This folder in intended to gather all files needed to take the course:
4+
- LabVIEW code exercices and solutions
5+
- Data files
6+
- …
7+
8+
NOTE: Each time you push modification to this folder a zip file is created that can be download from the course overview section.

www/en/modules/ROOT/pages/index.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ NOTE: This page is the entry point of the course.
1212

1313
== Download
1414

15-
{site-url}/{page-component-name}/{page-component-version}/{page-component-name}.pdf[PDF version of the course]
15+
* https://labviewcommunitytraining.github.io/cti-documentation/course-material.zip[Course material zip]
16+
17+
* {site-url}/{page-component-name}/{page-component-version}/{page-component-name}.pdf[PDF version of the course]

0 commit comments

Comments
 (0)