Update generate_almanaque_pdf.yml #2
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: Generate Almanaque PDF | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- closed | |
jobs: | |
generate_almanaque_pdf: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
sudo apt install texlive-full | |
sudo apt install rubber | |
- name: Run a python script | |
run: | | |
python3 ./.github/scripts/pdfer.py | |
commit_and_push: | |
needs: generate_almanaque_pdf | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Pdfer" | |
- name: Commit and push changes | |
run: | | |
git add . | |
git commit -m "Generated PDF" | |
git push | |
env: | |
PAT: ${{ secrets.GITHUB_TOKEN }} |