-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Site | ||
on: | ||
push: | ||
tags: ["*"] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# setup build environment | ||
- uses: coursier/cache-action@v5 | ||
- uses: olafurpg/setup-scala@v12 | ||
|
||
# this setup is all for the github pages deployment to work | ||
- name: install sphinx | ||
run: | | ||
pip3 install --user sphinx sphinx_rtd_theme | ||
which sphinx-build | ||
- name: setup git | ||
run: | | ||
git config --global user.name github-actions | ||
git config --global user.email [email protected] | ||
- name: Publish Site | ||
run: sbt ghpagesPushSite | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,24 +20,6 @@ jobs: | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
|
||
# this setup is all for the github pages deployment to work | ||
- name: install sphinx | ||
run: | | ||
pip3 install --user sphinx sphinx_rtd_theme | ||
which sphinx-build | ||
- name: setup git | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Install SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_KEY }} | ||
known_hosts: ${{ secrets.KNOWN_HOSTS }} | ||
- run: sbt ghpagesPushSite | ||
|
||
# generate a github release | ||
- name: Generate release changelog | ||
id: changelog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,12 @@ libraryDependencies ++= { | |
// configure github page | ||
enablePlugins(SphinxPlugin, SiteScaladocPlugin, GhpagesPlugin, SbtPlugin) | ||
|
||
git.remoteRepo := "[email protected]:sbt/sbt-native-packager.git" | ||
git.remoteRepo := { | ||
sys.env.get("GITHUB_TOKEN") match { | ||
case Some(token) => s"https://x-access-token:$token@github.com/sbt/sbt-native-packager" | ||
case None => "[email protected]:sbt/sbt-native-packager.git" | ||
} | ||
} | ||
|
||
// scripted test settings | ||
scriptedLaunchOpts += "-Dproject.version=" + version.value | ||
|