Simulate deploy on a test branch #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy PDF | |
# Controls when the action will run | |
on: | |
push: | |
branches: | |
- 'test/fake-deploy' | |
# 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: π SIMULATE Deploy | |
run: ls -la deploy |