-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (65 loc) · 1.72 KB
/
ghpages-projects.yml
File metadata and controls
71 lines (65 loc) · 1.72 KB
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
66
67
68
69
70
71
name: GHPages projects
on:
push:
branches: [ "master" ]
paths:
- 'manual/**'
- 'css/manual/**'
- 'com.sweaxizone.metro/**'
pull_request:
branches: [ "master" ]
paths:
- 'manual/**'
- 'css/manual/**'
- 'com.sweaxizone.metro/**'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Build'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: false
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.5.2/mdbook-v0.5.2-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
- name: Build books
run: |
bin/mdbook build manual
bin/mdbook build css/manual
- name: Git commit report
run: |
shopt -s extglob
rm -rf !(manual|css)
rm -rf manual/!(book)
rm -rf css/!(manual)
rm -rf css/manual/!(book)
mv -f manual/book/* manual
mv -f css/manual/book/* css/manual
# Git commit
git config --global user.name 'matheusds4'
git config --global user.email 'hydroperfox@gmail.com'
git switch -C ghpages
git rm -rf --cached .
git add .
git commit -m "Automated report"
git push origin -f ghpages