-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9637e6b
commit 15d416e
Showing
3 changed files
with
57 additions
and
127 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,129 +8,43 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
chktex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run chktex | ||
uses: xu-cheng/texlive-action@v2 | ||
with: | ||
scheme: full | ||
run: | | ||
for file in *.tex; do \ | ||
echo $file; \ | ||
chktex $file | tee /dev/stderr | (! grep -q ^); \ | ||
done | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: set PY | ||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
|
||
- name: cache stuff | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ env.pythonLocation }} | ||
~/.cache/pre-commit | ||
key: | | ||
pre-commit-${{ env.PY }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
- name: install dependencies | ||
run: pip install pre-commit | ||
|
||
- name: Install pre-commit hooks | ||
run: pre-commit install | ||
|
||
# This will run on all files in the repo not just those that have been | ||
# committed. Once formatting has been applied once globally, from then on | ||
# the files being changed by pre-commit should be just those that are | ||
# being committed - provided that people are using the pre-commit hook to | ||
# format their code. | ||
- name: run pre-commit | ||
run: pre-commit run --all-files --color always | ||
|
||
vale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@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 | ||
|
||
compile-latex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build PDF | ||
uses: xu-cheng/texlive-action@v2 | ||
with: | ||
scheme: full | ||
run: | | ||
latexmk -quiet | ||
- name: Upload artefacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artefacts | ||
path: | | ||
if-no-files-found: error | ||
|
||
upload-to-dropbox: | ||
runs-on: ubuntu-latest | ||
needs: compile-latex | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@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: | | ||
for file in *.pdf; do \ | ||
echo $file; \ | ||
./dropbox_uploader.sh upload $file $file; \ | ||
done | ||
chktex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: paddyroddy/.github/actions/latex/[email protected] | ||
|
||
vale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: paddyroddy/.github/actions/latex/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
compile-latex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: paddyroddy/.github/actions/latex/[email protected] | ||
|
||
- name: Upload artefacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artefacts | ||
path: "*.pdf" | ||
if-no-files-found: error | ||
|
||
upload-to-dropbox: | ||
runs-on: ubuntu-latest | ||
needs: compile-latex | ||
steps: | ||
- name: Download artefacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: artefacts | ||
|
||
- uses: paddyroddy/.github/actions/[email protected] | ||
with: | ||
configfile-version: ${{ secrets.CONFIGFILE_VERSION }} | ||
files-to-upload: $(find . -maxdepth 1 -name '*.pdf' -print) | ||
oauth-app-key: ${{ secrets.OAUTH_APP_KEY }} | ||
oauth-app-secret: ${{ secrets.OAUTH_APP_SECRET }} | ||
oauth-refresh-token: ${{ secrets.OAUTH_REFRESH_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "renovate/**" | ||
pull_request: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: paddyroddy/.github/actions/[email protected] | ||
with: | ||
pre-commit-config: ./.pre-commit-config.yaml |