-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) Β· 1.37 KB
/
deploy-pdf.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
name: 'Compile LaTeX & Deploy PDF'
# Controls when the action will run
on:
push:
branches:
- main
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
compile:
uses: ./.github/workflows/compile.yml
deploy:
runs-on: ubuntu-latest
needs: compile
steps:
- name: π½ Checkout
uses: actions/checkout@v3
with:
submodules: recursive # { false, true, recursive } default: false
- name: π Fill measurement-id placeholder
run: sed -i 's/${MEASUREMENT_ID}/${{ secrets.MEASUREMENT_ID }}/g' deploy/index.html
- name: π Inject dynamic data unlocker script
run: |
echo "::add-mask::${{ secrets.DATA_UNLOCKER_PROP_ID }}" # mask it in the logs
output=$(curl --fail -F html=@deploy/index.html 'https://api.dataunlocker.com/properties/${{ secrets.DATA_UNLOCKER_PROP_ID }}/scripts/latest/inject') && echo "$output" > deploy/index.html || echo "Failed to inject DataUnlocker's script"
- name: β¬οΈ Download artifact
uses: actions/download-artifact@v3
with:
name: pdf
path: deploy
- name: π Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: deploy # The folder the action should deploy.