-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.37 KB
/
Copy pathdraft-pdf.yml
File metadata and controls
50 lines (43 loc) · 1.37 KB
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
name: Draft PDF
on:
push:
paths:
- paper/**
- .github/workflows/draft-pdf.yml
# Needed so the publish step can push paper.pdf to the gh-pages branch.
permissions:
contents: write
jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
paper-path: paper/paper.md
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: paper
path: paper/paper.pdf
# Publish only the PDF to the gh-pages root, on main only. `keep_files: true`
# adds/overwrites paper.pdf without deleting the Documenter-managed docs that
# also live on gh-pages. Result: https://sloisel.github.io/MultiGridBarrier.jl/paper.pdf
- name: Stage PDF for Pages
if: github.ref == 'refs/heads/main'
run: |
mkdir -p _pages
cp paper/paper.pdf _pages/paper.pdf
- name: Publish PDF to gh-pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./_pages
keep_files: true
commit_message: "Publish paper.pdf"