Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error publishing docs #1618

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Site
on:
pull_request:
permissions:
contents: write
pages: write
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 github-actions@github.com

- name: Publish Site
run: sbt ghpagesPushSite
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 github-actions@github.com

- 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
Expand Down
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ libraryDependencies ++= {
// configure github page
enablePlugins(SphinxPlugin, SiteScaladocPlugin, GhpagesPlugin, SbtPlugin)

git.remoteRepo := "git@github.com: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 => "git@github.com:sbt/sbt-native-packager.git"
}
}

// scripted test settings
scriptedLaunchOpts += "-Dproject.version=" + version.value
Expand Down
Loading