generated from ivoa-std/doc-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ivoa-std/mcdittmar-patch-1
Add workflow to generate Release PDF
- Loading branch information
Showing
2 changed files
with
73 additions
and
3 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,70 @@ | ||
# 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 Release | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: doc | ||
|
||
env: | ||
doc_name: Coordinates | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v1 | ||
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 xsltproc latexmk cm-super | ||
sudo snap install pdftk | ||
- name: Build the document | ||
run: make ${{ env.doc_name }}.pdf | ||
|
||
- name: Check the output | ||
run: | | ||
test -f ${{ env.doc_name }}.pdf | ||
test -f ${{ env.doc_name }}.bbl | ||
- name: Move the auto-pdf-stable tag | ||
uses: weareyipyip/walking-tag-action@v2 | ||
with: | ||
tag-name: auto-pdf-stable | ||
tag-message: | | ||
Last commit taken into account for the automatically updated PDF of this IVOA document. | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update the PDF | ||
uses: Xotl/cool-github-releases@v1 | ||
with: | ||
mode: update | ||
isPrerelease: false | ||
tag_name: auto-pdf-stable | ||
release_name: "Auto PDF Release" | ||
body_mrkdwn: | | ||
This provides a PDF of the tagged release ${{ github.event.release.tag_name }} of this repository. | ||
It will be updated automatically on Release operations. | ||
_Corresponding commit: ${{ github.sha }}_ | ||
assets: doc/${{ env.doc_name }}.pdf | ||
replace_assets: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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