Add html to artifacts #7
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Setup Python3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install pip dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Create build and output folder | |
working-directory: ./english | |
run: | | |
mkdir -p build output | |
- name: Create format files with Python | |
working-directory: ./english | |
run: | | |
python format_english.py oxford_3000 | |
python format_english.py oxford_5000 | |
python format_english.py oxford_5000_exclusive | |
- name: Install wkthtmltopdf | |
run: | | |
sudo apt-get update && sudo apt-get install -y wkhtmltopdf | |
- name: Convert html to pdf with wkhtmltopdf | |
working-directory: ./english | |
run: | | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_3000_alphabetical.html output/oxford_3000_alphabetical.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_3000_by_cefr_shuffle.html output/oxford_3000_by_cefr_shuffle.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_3000_underscore_alphabetical.html output/oxford_3000_underscore_alphabetical.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_3000_underscore_by_cefr.html output/oxford_3000_underscore_by_cefr.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_3000_by_cefr.html output/oxford_3000_by_cefr.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_alphabetical.html output/oxford_5000_alphabetical.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_by_cefr.html output/oxford_5000_by_cefr.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_by_cefr_shuffle.html output/oxford_5000_by_cefr_shuffle.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_underscore_alphabetical.html output/oxford_5000_underscore_alphabetical.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_underscore_by_cefr.html output/oxford_5000_underscore_by_cefr.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_exclusive_alphabetical.html output/oxford_5000_exclusive_alphabetical.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_exclusive_by_cefr.html output/oxford_5000_exclusive_by_cefr.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_exclusive_by_cefr_shuffle.html output/oxford_5000_exclusive_by_cefr_shuffle.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_exclusive_underscore_alphabetical.html output/oxford_5000_exclusive_underscore_alphabetical.pdf | |
wkhtmltopdf --user-style-sheet format/table.css output/oxford_5000_exclusive_underscore_by_cefr.html output/oxford_5000_exclusive_underscore_by_cefr.pdf | |
- name: Create pdf with Latex | |
uses: xu-cheng/latex-action@v3 | |
with: | |
working_directory: english/format | |
latexmk_use_xelatex: true | |
root_file: | | |
*.tex | |
- name: Move pdfs from format/ to /output/ | |
run: | | |
mv english/format/*pdf english/output | |
- name: Upload PDF as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: english | |
path: english/output/* | |