-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (44 loc) · 1.41 KB
/
publish.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
name: Publish document
on:
pull_request:
types:
- labeled
env:
FOLDER: June2022
jobs:
publish:
if: github.event.label.name == 'publish'
runs-on: ubuntu-latest
name: Publish Document
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish PDF Document
run: |
sudo apt-get update
sudo apt-get install texlive-full
wget https://github.com/jgm/pandoc/releases/download/2.14.0.3/pandoc-2.14.0.3-1-amd64.deb
sudo dpkg -i pandoc-2.14.0.3-1-amd64.deb
cd "$FOLDER"
pandoc -d pandoc_defaults.yaml
- name: set env variables for inputs
id: set-env
run: |
echo ::set-output name=dir::$FOLDER
echo ::set-output name=name::"$FOLDER.pdf"
echo ::set-output name=path::"$FOLDER/$FOLDER.pdf"
- name: Upload Document
uses: actions/upload-artifact@v4
id: upload-document
with:
name: ${{ steps.set-env.outputs.name }}
path: ${{ steps.set-env.outputs.path }}
- name: Pull request artifacts
uses: gavv/[email protected]
with:
commit: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifacts-dir: ${{ steps.set-env.outputs.dir }}
artifacts-branch: editorial
artifacts: |
${{ steps.set-env.outputs.path }}