Skip to content

Add deploy/CNAME

Add deploy/CNAME #68

Workflow file for this run

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@v4
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.