Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create automatic preview on merge #44

Merged
merged 5 commits into from
Sep 12, 2023
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
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ jobs:

- name: Build the document
run: |
inkscape --version
make
make biblio forcetex
make role_diagram.pdf biblio forcetex

- name: Check the output
run: |
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Update PDF Preview

env:
doc_name: VOTable

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:

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

- name: Setup dependencies
run: |
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk ghostscript cm-super librsvg2-bin inkscape openjdk-8-jre-headless
sudo snap install pdftk

- name: Build the document
run: |
inkscape --version
make
make role_diagram.pdf biblio forcetex ${{ env.doc_name }}-draft.pdf

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

- name: Move the auto-pdf-preview tag
uses: weareyipyip/walking-tag-action@v2
with:
tag-name: auto-pdf-preview
tag-message: |
Last commit taken into account for the automatically updated PDF preview of this IVOA document.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update the PDF preview
uses: Xotl/cool-github-releases@v1
with:
mode: update
isPrerelease: true
tag_name: auto-pdf-preview
release_name: "Auto PDF Preview"
body_mrkdwn: |
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 }}_
assets: ${{ env.doc_name }}-draft.pdf
replace_assets: true
github_token: ${{ secrets.GITHUB_TOKEN }}
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# doc-template
document template
[![PDF-Preview](https://img.shields.io/badge/Preview-PDF-blue)](../../releases/download/auto-pdf-preview/VOTable-draft.pdf)

# VOTable
The VOTable format is an XML standard for the interchange of data represented as a set of tables. In this context, a table is an unordered set of rows, each of a uniform structure, as specified in the table description (the table metadata). Each row in a table is a sequence of table cells, and each of these contains either a primitive data type, or an array of such primitives.

## Status

The last stable version is
**[REC-1.4](https://www.ivoa.net/documents/VOTable/20191021/)**.

The next version will be 1.5.

## License

<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a>
Expand Down