-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.05 KB
/
manual.yaml
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
on:
# Creating a release requires a tag
push:
tags:
"manuel*"
paths:
- 'docs/manuel/**'
- '.github/workflows/manual.yaml'
jobs:
build-manual:
runs-on: ubuntu-22.04
container:
image: rust:latest
options: --user 1001 # So we avoid ownership issues
env:
book-dir: ./docs/manuel
steps:
- uses: actions/checkout@v4
- name: Declare some variables
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "branch=$(echo $GITHUB_REF | sed 's/refs\/\(tags\|heads\)\///;s/\//_/g')" >> "$GITHUB_ENV"
# Install mdbook
- name: Install `mdbook`
run: cargo install mdbook
# Build the book
- name: Build the book
run: |
mdbook build
tar zcvf manuel.tar.gz book
working-directory: ${{ env.book-dir }}
# Create a release
- name: Create a release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.book-dir }}/manuel.tar.gz