-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (64 loc) · 2.18 KB
/
build.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
59
60
61
62
63
64
65
66
67
68
name: Build and publish
on: workflow_dispatch
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build_pages:
name: Publish Edition as GitHub Pages Website
runs-on: ubuntu-latest
env:
ANT_OPTS: -Xmx5g
TYPESENSE_HOST: typesense.acdh-dev.oeaw.ac.at
TYPESENSE_PORT: 443
TYPESENSE_PROTOCOL: https
TYPESENSE_API_KEY: ${{secrets.TYPESENSE_API_KEY}}
steps:
- name: Perform Checkout
uses: actions/checkout@v3
- name: Fetch data
run: |
./build_app/shell/fetch_data.sh
- name: Fetch data entities
run: |
./build_app/shell/fetch_data_entities.sh
- name: Install Saxon, Ant and Fundament, staticSearch
run: |
apt-get update && apt-get install openjdk-11-jre-headless ant -y --no-install-recommend
./build_app/shell/script.sh
- name: Install Ant-Contrib
run: |
wget https://repo1.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar
mv ant-contrib-1.0b3.jar /usr/share/ant/lib
- name: Reorganize data
run: |
ant -f ./build_app/ant/copy-task.xml
- name: Add attributes
run: |
pip install -U pip
pip install -r ./build_app/python/requirements.txt
./build_app/shell/attributes.sh
./build_app/shell/denormalize.sh
- name: Build
run: |
ant -f ./build_app/ant/build.xml
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "./html"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Build Typesense Index
run: |
python ./build_app/python/make_ts_index.py