Skip to content

Add instructions to set up a Windows development environment (#199) #250

Add instructions to set up a Windows development environment (#199)

Add instructions to set up a Windows development environment (#199) #250

name: Publish course material to GitHub Pages
# Allow one concurrent deployment
concurrency:
group: GitHub Pages
cancel-in-progress: true
on:
push:
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build-course-material:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Delete files that should not be published
run: |
rm --recursive 00-evaluation-and-exam-archives
rm --recursive 99-material-for-the-teaching-staff
- name: Build course material content with Pandoc and weasyprint
uses: docker://alpine:edge
with:
entrypoint: sh
args: .github/workflows/build-course-material-content.sh
- name: Build presentation content with Marp
uses: docker://marpteam/marp-cli:v3.0.2
with:
entrypoint: sh
args: .github/workflows/build-presentation-content.sh
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: course-material
path: |
**/*.html
**/*.jpg
**/*.jpeg
**/*.pdf
**/*.png
**/*.svg
if-no-files-found: error
retention-days: 1
create-index-page-for-github-pages:
runs-on: ubuntu-latest
needs: build-course-material
steps:
- name: Download course-material
uses: actions/download-artifact@v3
with:
name: course-material
- name: Install packages
run: sudo apt install --yes tree
- name: Generate index.html with tree
run: |
tree -H '.' --noreport --dirsfirst -T 'HEIG-VD DAI Course' -P "*.html|*.pdf" --prune --charset utf-8 -o index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: .
publish-course-material-to-github-pages:
needs: create-index-page-for-github-pages
runs-on: ubuntu-latest
environment:
name: GitHub Pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1