📝 Ajout section nettoyer les panneaux solaires #11
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*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- 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: yq - portable yaml processor | |
uses: mikefarah/[email protected] | |
run: | | |
export SUB_TITLE | |
SUB_TITLE="$(date '+%d/%m/%Y %H:%M:%S') - $(git describe --tags --abbrev=0)" | |
yq -i '.subtitle = env(SUB_TITLE)' _config.yml | |
- name: Copy index.md to gh-pages branch | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git fetch | |
git checkout gh-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 |