-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Создан новый workflow, чтобы в канал отправлять уведомления только о …
…коммитах в master. Остальные будут отправляться в чат авторов
- Loading branch information
1 parent
5433ce9
commit 2252f33
Showing
3 changed files
with
48 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Handle new commit | ||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
jobs: | ||
build_latex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
- 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 | ||
texlive_version: 2024 | ||
latexmk_use_xelatex: true | ||
latexmk_shell_escape: true | ||
args: -bibtex -xelatex -file-line-error -halt-on-error -interaction=nonstopmode | ||
- name: Upload PDF file | ||
id: upload-pdf | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: PDF | ||
path: astro-notebook.pdf | ||
- name: Send Telegram message | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_CHAT_ID }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
${{ github.actor }} created new commit | ||
Commit message: ${{ github.event.commits[0].message }} | ||
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} | ||
Output pdf: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload-pdf.outputs.artifact-id }} |
5 changes: 4 additions & 1 deletion
5
.github/workflows/on_commit.yml → .github/workflows/on_commit_to_master.yml
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: Handle new commit | ||
on: [push] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build_latex: | ||
runs-on: ubuntu-latest | ||
|
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