Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
add github action to generate release PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
gpelouze committed Dec 25, 2019
1 parent 319ce94 commit 788902a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
export TEXMFHOME=/data/texmfhome
tlmgr init-usertree
tlmgr --usermode install mdframed zref needspace libertine titling
pandoc --pdf-engine=xelatex tuto_python_astro.md -o tuto_python_astro.pdf
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release PDF

on:
push:
tags:
- '*'

jobs:
release_pdf:
name: Release PDF
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- id: build_pdf
uses: docker://pandoc/latex:2.9
with:
entrypoint: '.github/workflows/entrypoint.sh'
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tuto_python_astro.pdf
asset_name: tuto_python_astro.pdf
asset_content_type: application/pdf

0 comments on commit 788902a

Please sign in to comment.