33 push :
44 branches :
55 - master
6+ - branch-*
67
78 pull_request :
89 branches :
@@ -15,62 +16,69 @@ jobs:
1516 build :
1617 runs-on : ubuntu-22.04
1718 steps :
18- - uses : actions/checkout@v4
19- with :
20- fetch-depth : 0
21- - name : Set up Java
22- uses : actions/setup-java@v4
23- with :
24- distribution : ' zulu'
25- java-version : ' 8'
26- - name : Compile JavaDoc
27- run : mvn -q clean install -DskipTests && mkdir -p docs/api/javadoc/spark && cp -r spark/common/target/apidocs/* docs/api/javadoc/spark/
28- - name : Compile ScalaDoc
29- run : mvn scala:doc && mkdir -p docs/api/scaladoc/spark && cp -r spark/common/target/site/scaladocs/* docs/api/scaladoc/spark
30- - uses : actions/setup-python@v5
31- with :
32- python-version : 3.x
33- - run : pip install mkdocs-jupyter
34- - run : pip install mkdocs-material
35- - run : pip install mkdocs-macros-plugin
36- - run : pip install mkdocs-git-revision-date-localized-plugin
37- - run : pip install mike
38- - run : sudo apt update
39- - uses : r-lib/actions/setup-r@v2
40- with :
41- r-version : release
42- use-public-rspm : true
43- - name : Query R dependencies
44- uses : r-lib/actions/setup-r-dependencies@v2
45- with :
46- cache : true
47- extra-packages : |
48- any::pkgdown
49- working-directory : ' ./R'
50- - run : Rscript -e 'pkgdown::build_site(pkg = "./R", preview = FALSE, override = list(destination = "../docs/api/rdocs"))'
51- - run : git config --global user.name = "GitHub Action"
52- - run : git config --global user.email = "test@abc.com"
53- - run : mkdocs build
54- - run : git fetch origin website --depth=1
55- - name : Deploy the doc to the website branch
56- if : ${{ github.event_name != 'pull_request' && github.repository == 'apache/sedona' }}
57- run : mike deploy latest-snapshot -b website -p
58- - run : mkdir staging
59- - run : cp -r site/* staging/
60- - uses : actions/upload-artifact@v3
61- with :
62- name : generated-docs
63- path : staging
64- - name : Cache Python packages
65- uses : actions/cache@v3
66- with :
67- path : ~/.cache/pip
68- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
69- restore-keys : |
70- ${{ runner.os }}-pip-
71- - name : Cache Maven packages
72- uses : actions/cache@v3
73- with :
74- path : ~/.m2
75- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
76- restore-keys : ${{ runner.os }}-m2
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+ - name : Set up Java
23+ uses : actions/setup-java@v4
24+ with :
25+ distribution : ' zulu'
26+ java-version : ' 8'
27+ - name : Compile JavaDoc
28+ run : mvn -q clean install -DskipTests && mkdir -p docs/api/javadoc/spark && cp -r spark/common/target/apidocs/* docs/api/javadoc/spark/
29+ - name : Compile ScalaDoc
30+ run : mvn scala:doc && mkdir -p docs/api/scaladoc/spark && cp -r spark/common/target/site/scaladocs/* docs/api/scaladoc/spark
31+ - uses : actions/setup-python@v5
32+ with :
33+ python-version : 3.x
34+ - run : pip install mkdocs-jupyter
35+ - run : pip install mkdocs-material
36+ - run : pip install mkdocs-macros-plugin
37+ - run : pip install mkdocs-git-revision-date-localized-plugin
38+ - run : pip install mike
39+ - run : sudo apt update
40+ - uses : r-lib/actions/setup-r@v2.10.1
41+ with :
42+ r-version : release
43+ use-public-rspm : true
44+ - name : Query R dependencies
45+ uses : r-lib/actions/setup-r-dependencies@v2.10.1
46+ with :
47+ cache : true
48+ extra-packages : |
49+ any::pkgdown
50+ working-directory : ' ./R'
51+ - run : Rscript -e 'pkgdown::build_site(pkg = "./R", preview = FALSE, override = list(destination = "../docs/api/rdocs"))'
52+ - run : git config --global user.name = "GitHub Action"
53+ - run : git config --global user.email = "test@abc.com"
54+ - run : mkdocs build
55+ - name : Deploy the doc to the website branch
56+ if : ${{ github.event_name != 'pull_request' && github.repository == 'apache/sedona' }}
57+ run : |
58+ if [[ "${GITHUB_REF##*/}" == "master" ]]; then
59+ git fetch origin website --depth=1
60+ mike deploy latest-snapshot -b website -p
61+ elif [[ "${GITHUB_REF##*/}" =~ ^branch-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
62+ git fetch origin website --depth=1
63+ version="${GITHUB_REF##*/branch-}"
64+ mike deploy --update-aliases "$version" latest -b website -p
65+ fi
66+ - run : mkdir staging
67+ - run : cp -r site/* staging/
68+ - uses : actions/upload-artifact@v3
69+ with :
70+ name : generated-docs
71+ path : staging
72+ - name : Cache Python packages
73+ uses : actions/cache@v3
74+ with :
75+ path : ~/.cache/pip
76+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
77+ restore-keys : |
78+ ${{ runner.os }}-pip-
79+ - name : Cache Maven packages
80+ uses : actions/cache@v3
81+ with :
82+ path : ~/.m2
83+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
84+ restore-keys : ${{ runner.os }}-m2
0 commit comments