Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This file generated from a template file maintained in the ivoatex repository.
# To create and install it into a project repository, do:
# make github-preview
# git commit
# git push
#
name: Check the IVOA document

env:
doc_name: ObsCore

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:

runs-on: ubuntu-latest

steps:

- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: true

- name: Setup dependencies
run: |
sudo apt update
sudo apt install texlive-latex-base texlive-latex-recommended \
texlive-latex-extra texlive-fonts-recommended \
librsvg2-bin latexmk \
pdftk xsltproc latexmk cm-super

- name: Build the document
run: make

- name: Check the output
run: |
test -f ${{ env.doc_name }}.pdf
test -f ${{ env.doc_name }}.bbl

- name: Keep the PDF artefact
uses: actions/upload-artifact@v4
with:
name: PDF Preview
path: ${{ env.doc_name }}.pdf
73 changes: 73 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This file generated from a template file maintained in the ivoatex repository.
# To create and install it into a project repository, do:
# make github-preview
# git commit
# git push
#
name: Update PDF Preview

env:
doc_name : ObsCore
branch_name: ${{ github.head_ref || github.ref_name }}
tag_preview: auto-pdf-preview

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:

- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: true

- name: Setup dependencies
run: |
sudo apt install texlive-latex-base texlive-latex-recommended \
texlive-latex-extra texlive-fonts-recommended \
librsvg2-bin latexmk \
pdftk xsltproc latexmk cm-super

- name: Build the document
run: make ${{ env.doc_name }}-draft.pdf

- name: Check the output
run: |
test -f ${{ env.doc_name }}-draft.pdf
test -f ${{ env.doc_name }}.bbl

- name: Remove the former PDF preview (if any)
run: |
existingTag=$( gh release list --exclude-drafts --json 'isPrerelease,tagName' \
--jq '.[] | select(.isPrerelease == true and .tagName == "${{ env.tag_preview }}") | .tagName' \
| xargs -n 1 echo )
if [ -n "$existingTag" ];
then
gh release delete --cleanup-tag "$existingTag"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload the new PDF preview
run: |
RELEASE_NOTES="This release aims to provide a PDF preview of the last commit applied on this repository.
It will be updated automatically after each merge of a PullRequest.
**DO NOT PUBLISH THIS PRE-RELEASE!**
_Corresponding commit: ${{ github.sha }}_"

gh release create ${{ env.tag_preview }} \
${{ env.doc_name }}-draft.pdf \
--prerelease \
--target "${{ env.branch_name }}" \
--title 'Auto PDF Preview' \
--notes "$RELEASE_NOTES"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.blg
*.toc
*.out
*.pdf
*.aux
*.bbl
ivoatexmeta.tex
*.log
*.html
*.zip
*.fdb_latexmk
*.fls
gitmeta.tex
*.swp
role_diagram.svg

# OS-specific
.DS_Store
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ivoatex"]
path = ivoatex
url = https://github.com/ivoa-std/ivoatex
Loading