Skip to content

Previous deploy script broke the pdf compile #34

Previous deploy script broke the pdf compile

Previous deploy script broke the pdf compile #34

Workflow file for this run

name: Build PDFs and Deploy
on:
push:
branches: [ "trunk" ]
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: mkdir -p ~/image-cache
- name: Cache Image
id: image-cache
uses: actions/cache@v3
with:
path: ~/image-cache
key: ${{ runner.os }}-image-cache
- name: Build docker image
if: steps.image-cache.outputs.cache-hit != 'true'
run: |
docker build . --file Dockerfile --tag latex
docker save -o ~/image-cache/latex.tar latex
- name: Load docker image from cache
if: steps.image-cache.outputs.cache-hit == 'true'
run: docker load -i ~/image-cache/latex.tar
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.8.0
- name: Build webapp
run: |
npm install -g pnpm
pnpm i
pnpm build
- name: Build pdf using docker image
run: |
docker run --rm -v "$(pwd):/home/porter/app" --name maths --user root --hostname latex latex sh ./deploy.sh -j -p
- name: Upload site artifact
uses: actions/upload-pages-artifact@v2
with:
path: "dist${{ steps.pages.outputs.base_path }}"
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2