Update 7-aide-construction-tableschema.md #495
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: "Build and deploy" | |
on: [push, pull_request] | |
jobs: | |
publish: | |
name: Publish to GitHub Pages | |
needs: pdf | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Download website build | |
uses: actions/download-artifact@v2 | |
with: | |
name: website | |
path: public/ | |
- name: Download PDF build | |
uses: actions/download-artifact@v2 | |
with: | |
name: pdf | |
path: pdf/ | |
- name: Move PDF files | |
run: mv pdf public/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: public | |
user_name: 'actions-user' | |
user_email: 'actions@github.com' | |
force_orphan: true | |
cname: guides.etalab.gouv.fr | |
pdf: | |
name: Build PDF files | |
needs: build | |
runs-on: ubuntu-latest | |
container: aergus/latex:2023-06-16 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
apt update | |
apt install -y python3-venv | |
- name: Install pandoc-guides | |
run: | | |
git clone https://github.com/etalab/pandoc-guides.git /tmp/pandoc-guides | |
cp /tmp/pandoc-guides/* . | |
python3 -m venv venv | |
. venv/bin/activate | |
pip install -r requirements.txt | |
- name: Generate PDF files | |
run: | | |
. venv/bin/activate | |
python main.py algorithmes 'Expliquer les algorithmes publics' pdf/guide-algorithmes.pdf | |
python main.py data.gouv.fr 'Publier les données sur data.gouv.fr' pdf/guide-data.gouv.fr.pdf | |
python main.py juridique "Identifier les données à ouvrir" pdf/guide-juridique.pdf | |
python main.py logiciels 'Ouvrir les codes sources' pdf/guide-logiciels.pdf | |
python main.py producteurs-schemas 'Créer des schémas de données' pdf/guide-producteurs-schemas.pdf | |
python main.py pseudonymisation "Pseudonymiser des documents grâce à l'IA" pdf/guide-pseudonymisation.pdf | |
python main.py qualite "Préparer les données à l'ouverture et la circulation" pdf/guide-qualite.pdf | |
python main.py reutilisation "Publier des réutilisations sur data.gouv.fr" pdf/guide-reutilisation.pdf | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: pdf | |
path: pdf/ | |
build: | |
name: Lint and build website | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install right Nodejs version | |
run: | | |
sudo npm install -g n | |
sudo n 16.19.1 | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.OS }}-node-${{ hashFiles('package-lock.json') }} | |
- name: Cache VuePress files | |
uses: actions/cache@v2 | |
with: | |
path: ./public | |
key: ${{ runner.OS }}-vuepress | |
- name: Install dependencies | |
run: npm install | |
- name: Lint Markdown files | |
run: npm run lint-md | |
- name: Build VuePress website | |
run: npm run build | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: website | |
path: public/ |