👷 Correction de l'installation des packages Ubuntu #5
Workflow file for this run
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
name: Generate PDF and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Pandoc and pdflatex | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-latex-extra | |
- name: Run script | |
run: ./generate.sh | |
- name: Copy index.md to gh-pages branch | |
run: | | |
git fetch | |
git checkoutgh-pages | |
cp gh-pages-index.md index.md | |
git add index.md | |
git commit -m "Add index.md to gh-pages" | |
git push origin gh-pages | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: Guide photovoltaïque en format PDF | |
draft: false | |
prerelease: false | |
- name: Upload guide-photovoltaique.pdf | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./guide-photovoltaique.pdf | |
asset_name: guide-photovoltaique.pdf | |
asset_content_type: application/pdf |