-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
38 lines (38 loc) · 1.3 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
name: "Baseprinter Action"
description: |
Generate HTML/PDF previews of Baseprint document snapshot and deploy to GitHub Pages.
inputs:
xargs-input:
description: "xargs input file of baseprinter arguments"
default: "baseprinter-xargs.txt"
baseprint-path:
description: "Path to generated baseprint snapshot contents"
default: "baseprint"
runs:
using: 'composite'
steps:
- name: "Checkout source"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Prepare autobaseprint branch"
shell: bash
run: |
git config user.name "Baseprinter Action Bot"
git config user.email "<>"
git fetch origin autobaseprint || git branch autobaseprint
git switch autobaseprint
git log -1 --format=%H
git merge --no-commit $GITHUB_REF_NAME
git status
rm -rf ${{ inputs.baseprint-path }}
- name: "Generate HTML/PDF previews of Baseprint document snapshot"
uses: docker://registry.gitlab.com/perm.pub/dock/baseprinter:24443-bd5
with:
args: xargs --arg-file ${{ inputs.xargs-input }} baseprinter
- name: "Commit generated baseprint"
shell: bash
run: |
git add ${{ inputs.baseprint-path }}
git commit -m "generated baseprint snapshot"
git push origin autobaseprint