This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree 3 files changed +35
-32
lines changed
3 files changed +35
-32
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
+ java-version : openjdk@1.8
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
6
echo " Configuring git..."
8
- git config --global user.email " travis@travis-ci.org "
9
- git config --global user.name " Travis CI "
7
+ git config --global user.email " <> "
8
+ git config --global user.name " Github Actions "
10
9
11
10
echo " Cloning docs repo..."
12
- git clone https://${GH_TOKEN } @github.com/codeoverflow-org/chatoverflow-gh-pages --branch master --single-branch --depth 1 docs
11
+ git clone https://${REPO_TOKEN } @github.com/codeoverflow-org/chatoverflow-gh-pages --branch master --single-branch --depth 1 docs
13
12
14
13
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
14
+ cp -fR target/scala-* /api docs/chatoverflow
15
+ cp -fR api/target/scala-* /api docs/chatoverflow-api
17
16
cd docs
18
17
19
18
echo " Updating wiki..."
20
19
git add .
21
- git commit --message " Deployed doc (Travis build # $TRAVIS_BUILD_NUMBER )"
22
- git push --force origin master
20
+ git commit --message " Deployed doc (Action build $GITHUB_ACTION )"
21
+ git push --force origin master
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments