-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (51 loc) · 1.6 KB
/
docker-image.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: Docker Image CI
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Get Yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set up cache key for node_modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Node.js dependencies
run: yarn --frozen-lockfile
- name: Install Prince
run: |
curl https://www.princexml.com/download/prince-14.2-linux-generic-x86_64.tar.gz -O
tar zxf prince-14.2-linux-generic-x86_64.tar.gz
cd prince-14.2-linux-generic-x86_64
yes "" | sudo ./install.sh
- name: Build PDF
run: npx docusaurus-prince-pdf -u https://jukalang.com/docs --output jukadocs.pdf
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: result
# The output filename can be specified with --output option
path: jukadocs.pdf
if-no-files-found: error
- name: Upload pdf to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: jukadocs.pdf
asset_name: jukadocs.pdf
tag: JukaLang
overwrite: true
body: "Latest version of Juka Docs"