Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit afb9cc6

Browse files
committed
Merge branch 'master' into develop
2 parents 49136a9 + 197aeed commit afb9cc6

File tree

3 files changed

+35
-32
lines changed

3 files changed

+35
-32
lines changed

.github/workflows/doc-deploy.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+

.scripts/update-docs.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
#!/bin/bash
22
set -ev
3-
SCALA_MAJOR=$(echo $TRAVIS_SCALA_VERSION | egrep '^[0-9]+\.[0-9]+' -o)
43

54
# Update the java-/scaladocs on https://github.com/codeoverflow-org/chatoverflow-gh-pages
65

76
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"
109

1110
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
1312

1413
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
1716
cd docs
1817

1918
echo "Updating wiki..."
2019
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

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)