-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (64 loc) · 2.08 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
62
63
64
65
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/action-checkout@0.2.22
- name: Compute the version of Hugo
id: hugo
shell: bash
run: |
USES=$(cat <<TRICK_RENOVATE
- uses: gohugoio/hugo@v0.139.0
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/setup-ruby@v1.202.0
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: Install Node
uses: actions/setup-node@v4.1.0
with:
node-version-file: package.json
- name: Transform and Inline Mermaid charts
uses: cric96/inline-mermaid@1.12.0
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/github-pages-deploy-action@v4.6.9
with:
branch: gh-pages
folder: slides-markdown/build