-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
67 lines (65 loc) · 1.55 KB
/
action.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
66
67
name: "deploy-flip-forge"
branding:
icon: book-open
color: purple
description: "Deploy flip forge on GitHub pages"
inputs:
file:
description: "PDF file to convert."
required: true
title:
description: "Page title"
required: false
default: "Flip forge"
backgroundColor:
description: "Background color"
required: false
default: "#000000"
toolbarColor:
description: "Toolbar color"
required: false
default: "#ffffff"
description:
description: "Description of the page"
required: false
default: ""
outputs:
dist:
description: "Dist folder"
value: ${{ steps.dist.outputs.dist }}
runs:
using: "composite"
steps:
- name: Configure GitHub Pages
id: configure
if: ${{ github.token }}
uses: actions/[email protected]
- name: "Install poppler"
shell: bash
run: |
sudo apt update -y
sudo apt install -y poppler-utils
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: "Install dependencies"
shell: bash
run: |
cd ${{ github.action_path }}
npm ci --omit=optional
- name: "Build site"
id: build
shell: bash
env:
STEPS: ${{ toJSON(steps) }}
INPUTS: ${{ toJSON(inputs) }}
GITHUB: ${{ toJSON(github) }}
run: |
cd ${{ github.action_path }}
npm run build-action
- name: Set dist folder
id: dist
shell: bash
run: |
cd ${{ github.action_path }}
echo "dist=$(realpath dist)" >> $GITHUB_OUTPUT