-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
54 lines (54 loc) · 1.95 KB
/
action.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
43
44
45
46
47
48
49
50
51
52
53
54
name: Deliverance
description: Universal document publishing system.
inputs:
github_token:
description: GitHub token (for creating releases and publishing to GitHub pages)
required: true
default: ""
disable_pdf_slides:
description: Disable PDF slide generation
required: false
default: false
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up hydrun
shell: bash
run: |
curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.linux-$(uname -m)"
sudo install /tmp/hydrun /usr/local/bin
- name: Build with hydrun
shell: bash
run: hydrun -o texlive/texlive "apt update && apt install -y curl pandoc node-katex zip python3-pip tree && git config --global --add safe.directory '*' && ./configure && make depend && make -j $(nproc) DISABLE_PDF_SLIDES=${{ inputs.disable_pdf_slides }}"
- name: Fix permissions for output
shell: bash
run: sudo chown -R $USER .
- name: Publish release archive to GitHub releases
if: ${{ github.ref == 'refs/heads/main' }}
# TODO: Port this to `softprops/action-gh-release@v2` at some point
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ inputs.github_token }}"
automatic_release_tag: latest
prerelease: false
files: |
out/release.tar.gz
out/release.zip
- name: Extract release archive
shell: bash
run: |
mkdir -p /tmp/gh-pages
tar xvzf out/release.tar.gz -C /tmp/gh-pages
- name: Publish release to GitHub pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/[email protected]
with:
token: "${{ inputs.github_token }}"
branch: gh-pages
folder: /tmp/gh-pages
git-config-name: GitHub Pages Bot
git-config-email: [email protected]