-
Notifications
You must be signed in to change notification settings - Fork 17
58 lines (51 loc) · 1.58 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
on:
push:
branches:
- master
- develop
- feature/*
jobs:
gen_docs:
name: generate DOAJ documentation and functional tests and push to the docs repo
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
statuses: write
steps:
- name: checkout the branch of interest
uses: actions/checkout@v4
with:
path: doaj
- name: checkout the documentation repo
uses: actions/checkout@v4
with:
path: doaj-docs
repository: DOAJ/doaj-docs
token: ${{ secrets.STEVE_PAT_DOAJ_ACTIONS_DOCS }}
fetch-depth: 0
- name: set up a python 3.10 environment
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: install elasticsearch
uses: getong/[email protected]
with:
# for some reason 7.10.2 isn't on docker hub
elasticsearch version: 7.10.1
- name: install the DOAJ dependencies
run: |
cd $GITHUB_WORKSPACE/doaj
pip install -e .[test]
pip install -e .[docs]
- name: run the docs generation script and push to the docs repo
run: |
export DOAJENV=test
cd $GITHUB_WORKSPACE/doaj/docs
sh gendocs.sh --nocov
cd $GITHUB_WORKSPACE/doaj-docs
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "GH Actions docs run for ${{ github.ref_name }}"
git push