-
Notifications
You must be signed in to change notification settings - Fork 385
78 lines (68 loc) · 2.07 KB
/
ibis.yml
File metadata and controls
78 lines (68 loc) · 2.07 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
72
73
74
75
76
77
78
name: Generate eBook and Deploy to GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: gd, zip, mbstring
coverage: none
- name: Cache Composer packages
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --optimize-autoloader
- name: Generate eBooks (All Formats)
run: |
composer run pdf
composer run pdf-dark
composer run epub
composer run html
composer run sample
composer run sample-dark
- name: Check for changes
id: verify-changed-files
run: |
if git diff --quiet HEAD -- ebook/en/export/ index.html; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push all changes (including GitHub Pages HTML)
if: steps.verify-changed-files.outputs.changed == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
git config --local user.email "bobby@bobbyiliev.com"
git config --local user.name "Bobby Iliev"
git add ebook/en/export/ index.html
git commit -m "🤖 Auto-update eBook files and GitHub Pages [skip ci]" || exit 0
git push
- name: Upload eBook artifacts
uses: actions/upload-artifact@v4
with:
name: ebooks-${{ github.sha }}
path: |
ebook/en/export/*.pdf
ebook/en/export/*.epub
ebook/en/export/*.html
index.html
retention-days: 90