docs(readme): fix logo links #26
Workflow file for this run
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: [ master, improve-ci ] | |
pull_request: | |
branches: [ master, improve-ci ] | |
workflow_dispatch: | |
## thanks to https://github.com/mff-cuni-cz/cuni-thesis-validator | |
jobs: | |
build: | |
name: Build PDF and upload as an artifact | |
runs-on: ubuntu-latest | |
container: { image: 'aergus/latex' } | |
steps: | |
- name: Instal git-lfs | |
run: apt-get update && apt-get install -y git-lfs | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Build the PDF | |
run: latexmk thesis | |
- name: Upload the artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Thesis | |
path: | | |
README.md | |
thesis.pdf | |
verify: | |
name: Verify PDF/A | |
runs-on: ubuntu-latest | |
needs: build | |
container: { image: ghcr.io/jdujava/cuni-thesis-validator } | |
steps: | |
- name: Get the PDF file from the artifact | |
uses: actions/download-artifact@v4 | |
- name: Verify the PDF file with VeraPDF | |
run: verify Thesis/*.pdf | tee /dev/stderr | grep -qE 'nonCompliant="0" failedJobs="0"' | |
deploy: | |
name: Deploy latest build of PDF and README.md to gh-pages branch | |
if: github.event_name == 'push' # only deploy on push | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write | |
steps: | |
- name: Get the PDF and README.md from the artifact | |
uses: actions/download-artifact@v4 | |
- name: Commit and push the PDF and README.md to `gh-pages` branch | |
run: | | |
cd Thesis | |
git init -b temp | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
git add . | |
git commit -m "[CI] Update to latest PDF and README.md" | |
git push --force origin temp:gh-pages |