Skip to content

πŸš€ Deploy

πŸš€ Deploy #258

Workflow file for this run

name: πŸš€ Deploy
on:
workflow_dispatch: {}
schedule: [cron: '0 0 */1 * *']
push:
branches: [master, main]
paths-ignore: ['.devcontainer/**', README.md]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
generate-pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: peaceiris/actions-hugo@v3
with: {hugo-version: 0.101.0, extended: true}
- run: sudo apt update && sudo apt install ghostscript wkhtmltopdf # https://wkhtmltopdf.org/
- run: hugo --minify -d ./4pdf
env: {HUGO_RELATIVEURLS: true, HUGO_GOOGLEANALYTICS: '', GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'}
- run: wkhtmltopdf --enable-local-file-access --lowquality ./4pdf/index.html ./cv-uncompressed.pdf
- run: |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH \
-sOutputFile=./cv.pdf ./cv-uncompressed.pdf
- uses: actions/upload-artifact@v4
with: {name: cv-en.pdf, path: ./cv.pdf, if-no-files-found: error, retention-days: 1}
- run: rm -v ./cv-uncompressed.pdf ./cv.pdf
- run: wkhtmltopdf --enable-local-file-access --lowquality ./4pdf/ru/index.html ./cv-uncompressed.pdf
- run: |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH \
-sOutputFile=./cv.pdf ./cv-uncompressed.pdf
- uses: actions/upload-artifact@v4
with: {name: cv-ru.pdf, path: ./cv.pdf, if-no-files-found: error, retention-days: 1}
update-cv-page:
runs-on: ubuntu-latest
needs: [generate-pdf]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: https://klassuk.github.io/
steps:
- uses: actions/checkout@v4
- uses: peaceiris/actions-hugo@v3
with: {hugo-version: 0.101.0, extended: true}
- run: hugo --minify --baseURL "https://klassuk.github.io/" -d ./dist
env: {GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'}
- uses: actions/download-artifact@v4
with: {name: cv-en.pdf, path: ./dist}
- uses: actions/download-artifact@v4
with: {name: cv-ru.pdf, path: ./dist/ru}
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with: {path: ./dist}
- uses: actions/deploy-pages@v4