-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (64 loc) · 1.73 KB
/
build.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: Pages
on:
push:
branch:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Update modification date and commit info
run: make modify-date
- name: Build and Commit
uses: sphinx-notes/pages@master
with:
extra_files: |
LICENSE
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
build-pdf:
needs: build
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: install python3
run: |
sudo apt -y update
sudo apt -y install python3 python3-pip
- name: install python3 dependencies
run: |
python3 -m pip install -r requirements.txt
- name: install latex dependencies
run: |
sudo apt install -y latexmk texlive texlive-fonts-extra texlive-full
- name: build PDF
run: make latexpdf
- name: do some trick ;-)
shell: bash
run: |
stat '_build/latex/matematyka.pdf'
mv '_build/latex/matematyka.pdf' ..
rm -rf *
git add .
git config user.name gucio321
git config user.email [email protected]
mv ../matematyka.pdf .
git add .
git commit --amend --no-edit
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: pdf
force: true