Skip to content

Creating style for technical briefs #11

Creating style for technical briefs

Creating style for technical briefs #11

Workflow file for this run

name: Build and publish
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-book:
runs-on: ubuntu-latest
steps:
- name: Set up repository
uses: actions/checkout@v6
with:
path: repo
- name: Compile articles
uses: xu-cheng/latex-action@v4
with:
working_directory: repo/briefs
root_file: "*.tex"
- name: Upload to autogen repository
run: |
# Clone autogen repository
git clone https://gcarcassi:${{ secrets.AUTOGEN_TOKEN }}@github.com/assumptionsofphysics/autogen autogen
ls -R
cd repo
find . -type f -iname '*.pdf' -print0 | rsync -0a --files-from=- --remove-source-files ./ ../autogen/
cd ../autogen
ls -R
git add '**/*.pdf'
# Commit and push only if there were changes
if ! git diff --cached --quiet; then
git config user.name "gcarcassi[bot]"
git config user.email "gabriele.carcassi@gmail.com"
git pull
git commit -m "Updating community articles"
git push
else
echo "No changes to commit."
fi