This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +32
-33
lines changed Expand file tree Collapse file tree 3 files changed +32
-33
lines changed Original file line number Diff line number Diff line change
1
+ name : Javadoc Deploy
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ publish :
10
+ if : startsWith(github.repository, "codeoverflow-org") # don't run this in forks
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v1
14
+ - name : Clone API
15
+ run : git clone https://github.com/codeoverflow-org/chatoverflow-api --branch master --single-branch --depth 1 api
16
+ - uses : olafurpg/setup-scala@v5
17
+ name : Install java & sbt
18
+ with :
19
+
20
+
21
+ - name : Generate documentation
22
+ run : sbt -Dfile.encoding=UTF8 fetch reload update doc
23
+
24
+ - name : Publish documentation
25
+ run : bash .scripts/update-docs.sh
26
+ env :
27
+ REPO_TOKEN : ${{ secrets.REPO_TOKEN }}
28
+
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -ev
3
- SCALA_MAJOR=$( echo $TRAVIS_SCALA_VERSION | egrep ' ^[0-9]+\.[0-9]+' -o)
4
3
5
4
# Update the java-/scaladocs on https://github.com/codeoverflow-org/chatoverflow-gh-pages
6
5
7
- echo " Configuring git..."
8
- git config --global user.email
" [email protected] "
9
- git config --global user.name " Travis CI"
10
-
11
6
echo " Cloning docs repo..."
12
- git clone https://${GH_TOKEN } @github.com/codeoverflow-org/chatoverflow-gh-pages --branch master --single-branch --depth 1 docs
7
+ git clone https://${REPO_TOKEN } @github.com/codeoverflow-org/chatoverflow-gh-pages --branch master --single-branch --depth 1 docs
13
8
14
9
echo " Copying docs..."
15
- cp -fR target/scala-$SCALA_MAJOR /api docs/chatoverflow
16
- cp -fR api/target/scala-$SCALA_MAJOR /api docs/chatoverflow-api
10
+ cp -fR target/scala-* /api docs/chatoverflow
11
+ cp -fR api/target/scala-* /api docs/chatoverflow-api
17
12
cd docs
18
13
19
14
echo " Updating wiki..."
20
15
git add .
21
- git commit --message " Deployed doc (Travis build # $TRAVIS_BUILD_NUMBER )"
16
+ git commit --message " Deployed doc (Action build $GITHUB_ACTION )"
22
17
git push --force origin master
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments