Update actions/checkout digest to 8ade135 (#5) #399
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: deploy | |
on: [push, pull_request] | |
jobs: | |
chktex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout source | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
- name: Run chktex | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: | | |
chktex thesis.tex | tee /dev/stderr | (! grep -q ^) | |
vale: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout source | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
- name: Run Vale | |
uses: errata-ai/vale-action@v2 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
fail_on_error: true | |
filter_mode: nofilter | |
reporter: github-check | |
vale_flags: "--glob='!{config/,figures/*/example_,thesis}*'" | |
compile-latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout source | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
- name: Build PDF | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: | | |
latexmk -quiet | |
- name: Upload artefacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artefacts | |
path: | | |
*.bib | |
*.bcf | |
if-no-files-found: error | |
check-citations-referenced: | |
runs-on: ubuntu-latest | |
needs: compile-latex | |
steps: | |
- name: Download artefacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artefacts | |
- name: Fix regex for checkcites | |
uses: xu-cheng/texlive-action/full@v1 | |
id: references | |
with: | |
run: | | |
sed -i 's#\sglob="false"##' thesis.bcf | |
echo ::set-output name=uncited::\ | |
$(checkcites -b biber thesis -u | grep -c "=>") | |
- name: Check all references cited | |
if: ${{ steps.references.outputs.uncited > 0 }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
core.setFailed('Not all references cited') | |
upload-to-dropbox: | |
runs-on: ubuntu-latest | |
needs: compile-latex | |
steps: | |
- name: checkout source | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
- name: Download artefacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artefacts | |
- name: Set up Dropbox | |
run: | | |
echo "CONFIGFILE_VERSION=$CONFIGFILE_VERSION" > ~/.dropbox_uploader | |
echo "OAUTH_APP_KEY=$OAUTH_APP_KEY" >> ~/.dropbox_uploader | |
echo "OAUTH_APP_SECRET=$OAUTH_APP_SECRET" >> ~/.dropbox_uploader | |
echo "OAUTH_REFRESH_TOKEN=$OAUTH_REFRESH_TOKEN" >> ~/.dropbox_uploader | |
env: | |
CONFIGFILE_VERSION: ${{secrets.CONFIGFILE_VERSION}} | |
OAUTH_APP_KEY: ${{secrets.OAUTH_APP_KEY}} | |
OAUTH_APP_SECRET: ${{secrets.OAUTH_APP_SECRET}} | |
OAUTH_REFRESH_TOKEN: ${{secrets.OAUTH_REFRESH_TOKEN}} | |
- name: Retieve Dropbox uploader script | |
run: | | |
curl "https://raw.githubusercontent.com/andreafabrizi/\ | |
Dropbox-Uploader/master/dropbox_uploader.sh" \ | |
-o dropbox_uploader.sh | |
chmod +x dropbox_uploader.sh | |
- name: Upload PDF | |
run: | | |
./dropbox_uploader.sh upload thesis.pdf patrick_roddy_thesis.pdf |