This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (60 loc) · 1.96 KB
/
markdown-slides.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Markdown slides build and deploy
on:
push:
branches-ignore:
- 'renovate/**'
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
pull_request:
workflow_dispatch:
jobs:
build-slides:
concurrency:
group: markdown-${{ github.ref }}
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout
uses: danysk/[email protected]
- name: Compute the version of Hugo
id: hugo
shell: bash
run: |
USES=$(cat <<TRICK_RENOVATE
- uses: gohugoio/[email protected]
TRICK_RENOVATE
)
echo "Computed version: \"${USES#*@v}\""
echo "::set-output name=version::${USES#*@v}"
- name: Download Hugo
run: |
HUGO_VERSION="${{ steps.hugo.outputs.version }}"
URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
wget --retry-connrefused --waitretry=1 --read-timeout=20 "$URL" --output-document=hugo.deb
- name: Install Hugo
run: sudo dpkg -i hugo.deb
- name: Remove Hugo Installer
run: rm hugo.deb
- name: Setup Ruby
uses: ruby/[email protected]
with:
working-directory: slides-markdown/shared-slides
- name: Run the pre-processor
working-directory: slides-markdown
run: shared-slides/preprocess.rb
- name: Build slides with hugo
working-directory: slides-markdown
run: hugo
- name: Transform and Inline Mermaid charts
uses: cric96/[email protected]
with:
root-folder: slides-markdown/build
config-file: slides-markdown/config.toml
- name: Deploy
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: slides-markdown/build