-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GitHub Actions] GitHub Pages deployment
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Nom du workflow | ||
name: "Build and deploy Github pages" | ||
|
||
# Evenements sur lesquels il doit être déclenché | ||
on: | ||
push: # <- Déclenché lorsque l'on pousse du code... | ||
branches: | ||
- master # <- ... mais seulement sur la branche "master" | ||
|
||
jobs: | ||
|
||
# Notre job | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
# Tâches à effectuer, comme expliquées ci-dessus | ||
steps: | ||
|
||
# 1. On récupère le contenu du dépôt | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
# 2. Partie spécifique à Sphinx (installation des | ||
# dépendances et génération de la doc) | ||
- name: "Set up Python" | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: "Install Python dependencies" | ||
run: | | ||
pip3 install setuptools | ||
pip3 install sphinx | ||
pip3 install sphinx-rtd-theme | ||
- name: "Build Sphinx Doc" | ||
run: | | ||
make html | ||
# 3. Déploiement sur les Github Pages | ||
- name: "Deploy Github Pages" | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # <- Branche sur laquelle seront commités les fichiers | ||
FOLDER: build/html/ # <- Dossier contenant notre documentation générée |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = docs | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |