Skip to content

Commit

Permalink
add github action to generate doc PDF on release
Browse files Browse the repository at this point in the history
  • Loading branch information
gpelouze committed Dec 25, 2019
1 parent d6df535 commit f1a0f67
Show file tree
Hide file tree
Showing 3 changed files with 84 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 doc/doc_TP_coupole.md -o doc/doc_TP_coupole.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: ./doc/doc_TP_coupole.pdf
asset_name: doc_TP_coupole.pdf
asset_content_type: application/pdf
44 changes: 44 additions & 0 deletions doc/doc_TP_coupole.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
---
title: Codes pour l'ASTronomie à ORsay
subtitle: Installation et utilisation
thanks: <https://pypi.org/project/castor-orsay/>
date: Novembre 2019
shortauthor: A. Stcherbinine & G. Pelouze
author:
- Aurélien Stcherbinine (<[email protected]>)
- Gabriel Pelouze (<[email protected]>)

lang: fr
toc: False
numbersections: true
toc-depth: 2
papersize: a4
geometry:
- top=30mm
- bottom=32mm
- left=20mm
- right=30mm
linkcolor: blue
urlcolor: blue
toccolor: blue
header-includes: |
\usepackage[mono=false]{libertine}
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{\oldtableofcontents\clearpage}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}
\renewcommand{\labelitemi}{–}
\usepackage{fancyhdr}
\usepackage{titling}
\fancyhead{}
\fancyhead[c]{\textit{A. Stcherbinine \& G. Pelouze :} \thetitle}
\renewcommand{\headrulewidth}{0.4pt}
\pagestyle{fancy}
\usepackage[linecolor=lightgray,linewidth=1pt,skipabove=12pt,skipbelow=15pt]{mdframed}
\surroundwithmdframed{Shaded}
...

# Installation de CASTOR sur les sessions UPSud
En raison des restrictions utilisateurs sur les machines du département, il nous
est impossible d'installer le module via `pip` (même en local).
Expand Down

0 comments on commit f1a0f67

Please sign in to comment.