1- name : Publish documentation to project website and package to the Maven Central Repository
1+ name : Publish documentation to project website and Package to Maven Central Repository
22on :
3- [push]
4- # release:
5- # types: [created]
3+ release :
4+ types : [created]
65jobs :
6+ publish-doc :
7+ runs-on : ubuntu-20.04
8+ steps :
9+ - name : Install ansi2txt tool
10+ run : |
11+ sudo apt-get update
12+ sudo apt-get install colorized-logs
13+ - uses : actions/checkout@v2
14+ with :
15+ token : ${{ secrets.PAT_TOKEN }}
16+ - name : Generate API Doc
17+ run : sbt +doc
18+ - name : Make API Doc directory outside repository
19+ run : mkdir -p ../api_docs
20+ - name : Move API Docs to outside directory
21+ run : |
22+ source .workflow-scripts/put_scala_docs_aside.sh ./target ../api_docs
23+ cp .workflow-scripts/move_scala_docs.sh ../api_docs/
24+ cp .workflow-scripts/update_json_api_versions.py ../api_docs/
25+ echo "scala_versions=$scala_versions" >> $GITHUB_ENV
26+ echo "api_version=$api_version" >> $GITHUB_ENV
27+ - name : Git checkout on gh-pages
28+ run : |
29+ git fetch
30+ git checkout gh-pages
31+ - name : Move API Docs to website API Docs directory
32+ run : |
33+ cd ..
34+ export scala_versions="${{ env.scala_versions }}"
35+ export api_version="${{ env.api_version }}"
36+ bash api_docs/move_scala_docs.sh ./api_docs "./${GITHUB_REPOSITORY#*/}/docs/_api" ./api_docs "./${GITHUB_REPOSITORY#*/}/docs/_data/api_versions.json"
37+ - name : Git add and commit on gh-pages
38+ run : |
39+ git config user.name "$GITHUB_ACTOR"
40+ git config user.email "$GITHUB_ACTOR+github-actions@users.noreply.github.com"
41+ git add docs/_api/.
42+ git add docs/_data/api_versions.json
43+ git commit -m "[RELEASE] Update doc version from branch \"$GITHUB_REF\" commit \"$GITHUB_REF\""
44+ git push
45+
746 publish-package :
847 runs-on : ubuntu-latest
9- # needs: [publish-doc]
48+ needs : [publish-doc]
1049 steps :
1150 - name : Install gpg secret key
1251 run : |
2564 env :
2665 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
2766 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
28-
29- # publish-doc:
30- # runs-on: ubuntu-20.04
31- # steps:
32- # - name: Install ansi2txt tool
33- # run: |
34- # sudo apt-get update
35- # sudo apt-get install colorized-logs
36- # - uses: actions/checkout@v2
37- # with:
38- # token: ${{ secrets.PAT_TOKEN }}
39- # - name: Generate API Doc
40- # run: sbt +doc
41- # - name: Make API Doc directory outside repository
42- # run: mkdir -p ../api_docs
43- # - name: Move API Docs to outside directory
44- # run: |
45- # source .workflow-scripts/put_scala_docs_aside.sh ./target ../api_docs
46- # cp .workflow-scripts/move_scala_docs.sh ../api_docs/
47- # cp .workflow-scripts/update_json_api_versions.py ../api_docs/
48- # echo "scala_versions=$scala_versions" >> $GITHUB_ENV
49- # echo "api_version=$api_version" >> $GITHUB_ENV
50- # - name: Git checkout on gh-pages
51- # run: |
52- # git fetch
53- # git checkout gh-pages
54- # - name: Move API Docs to website API Docs directory
55- # run: |
56- # cd ..
57- # export scala_versions="${{ env.scala_versions }}"
58- # export api_version="${{ env.api_version }}"
59- # bash api_docs/move_scala_docs.sh ./api_docs "./${GITHUB_REPOSITORY#*/}/docs/_api" ./api_docs "./${GITHUB_REPOSITORY#*/}/docs/_data/api_versions.json"
60- # - name: Git add and commit on gh-pages
61- # run: |
62- # git config user.name "$GITHUB_ACTOR"
63- # git config user.email "$GITHUB_ACTOR+github-actions@users.noreply.github.com"
64- # git add docs/_api/.
65- # git add docs/_data/api_versions.json
66- # git commit -m "[RELEASE] Update doc version from branch \"$GITHUB_REF\" commit \"$GITHUB_REF\""
67- # git push
0 commit comments