-
-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (34 loc) · 1.08 KB
/
generate-doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 📖 Documentation
on:
pull_request:
# on pull request we just want to build
push:
# on merge to main, build and publish
# FIXME: remove ci-generate-docs before merging !
branches: [ "main" ]
jobs:
documentation:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: ensure we have a config file
run: |
echo "" > .envrc
echo CONFIG_PATH=data/config/openfoodfacts.yml >> .envrc
echo USER_IID=$(id -u) >>.envrc
echo USER_GID=$(id -g) >>.envrc
# generating project documentation
- name: Build documentation with MkDocs
run: |
./scripts/generate_doc.sh
- name: Deploy documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.6.8
# we only deploy on push to main
if: |
github.event_name == 'push' && github.event.ref == 'refs/heads/main'
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "gh-pages"
folder: gh_pages