Add publications section #82
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: Build bundle and generate PDFs | |
# Build is done for all pushes except the master branch. | |
# In master, this workflow is called through deploy.yml | |
on: | |
push: | |
branches-ignore: [master] | |
workflow_call: | |
# Allow one concurrent build for each branch | |
concurrency: | |
group: build-pages-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PDF_OPTIONS: | | |
{"format": "A4"} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Read-only permissions for GITHUB_TOKEN | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm install | |
- name: Build the app | |
env: | |
VITE_GITHUB_REPO: ${{ github.repository }} | |
run: npm run build | |
- name: Serve the app | |
run: npm run preview -- --host & npx wait-on tcp:4173 | |
- name: Generate PDF file (en) | |
uses: ntdesmond/html2pdf-action@v1 | |
with: | |
path: http://172.17.0.1:4173/cv.html?language=en | |
output: ./build/cv_en.pdf | |
options: ${{ env.PDF_OPTIONS }} | |
- name: Generate PDF file (ru) | |
uses: ntdesmond/html2pdf-action@v1 | |
with: | |
path: http://172.17.0.1:4173/cv.html?language=ru | |
output: ./build/cv_ru.pdf | |
options: ${{ env.PDF_OPTIONS }} | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: "build/" |