Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AShepelevv authored Jan 3, 2024
1 parent b984eb9 commit 827fbdb
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- uses: kceb/pull-request-url-action@v1
id: pr-url
- name: Set up Git repository
uses: actions/checkout@v4

- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all

- run: echo "Your PR is ${PR}"
if: success() && steps.findPr.outputs.number
env:
PR: ${{ steps.findPr.outputs.pr }}

- name: send telegram message on push
uses: appleboy/telegram-action@master
with:
Expand All @@ -15,22 +26,29 @@ jobs:
${{ github.actor }} created commit:
Commit message: ${{ github.event.commits[0].message }}
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
See PR: ${{ steps.pr-url.outputs.url }}
- name: Set up Git repository
uses: actions/checkout@v4
See PR: ${{ PR }} ${{steps.findPr.outputs.pr}}
- name: Create resources folder
run: mkdir -p tikz/resource

- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: astro-notebook.tex
latexmk_use_xelatex: true
latexmk_shell_escape: true
args: -pdf -file-line-error -halt-on-error -interaction=nonstopmode

- name: Upload PDF file
uses: actions/upload-artifact@v3
with:
name: PDF
path: astro-notebook.pdf
- name: Send result file to Telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message_file: astro-notebook.pdf


0 comments on commit 827fbdb

Please sign in to comment.