summaryrefslogtreecommitdiff
path: root/.github/workflows/static.yml
blob: cfd1e4518c99779cbb3446d4c6d2c7bf223cadd1 (plain) (blame)
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: 🚀 Deploy to Pages

on:
  push:
    branches: ["main"]

  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: true

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛒
        uses: actions/checkout@v3
      - name: Setup Pages 🏗️
        uses: actions/configure-pages@v3
      - name: Build Artifact 🔨
        run: |
          wget https://github.com/pdf2htmlEX/pdf2htmlEX/releases/download/v0.18.8.rc1/pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-bionic-x86_64.deb
          sudo apt install ./pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-bionic-x86_64.deb -y

          wget https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%400.12.0/tectonic-0.12.0-x86_64.AppImage
          chmod +x tectonic-0.12.0-x86_64.AppImage
          ./tectonic-0.12.0-x86_64.AppImage --appimage-extract

          ./squashfs-root/usr/bin/tectonic -X build
          mkdir html
          pdf2htmlEX --zoom 1.3 build/default/default.pdf html/index.html
      - name: Upload Artifact ⬆️
        uses: actions/upload-pages-artifact@v1
        with:
          path: "html"
      - name: Deploy to GitHub Pages 📦
        id: deployment
        uses: actions/deploy-pages@v1