Skip to content

Commit

Permalink
Task #142 - Add document site using sbt-microsites
Browse files Browse the repository at this point in the history
* Added: GitHub Actions to publish microsite to GitHub Pages
  • Loading branch information
kevin-lee committed Jan 9, 2020
1 parent 7bc4007 commit 8338df5
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/publish-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish GitHub Pages

on:
pull_request:
branches:
- publish-docs

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Cache Coursier
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-coursier-scala-2_13-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-coursier-scala-2_13-
- name: Cache Ivy
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-scala-2_13-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-ivy-scala-2_13-
- name: publish GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_AUTH_TOKEN }}
run: |
docker run \
-e GITHUB_TOKEN=$GITHUB_TOKEN \
-v ${{ github.workspace }}:/app \
-v ~/.cache/coursier:/root/.cache/coursier:z \
-v ~/.ivy2/cache:/root/.ivy2/cache:z \
k3vin/sbt-java8-jekyll:latest /bin/bash -c "cd /app && sbt 'project docs' clean publishMicrosite"
- name: correct dir permission
run: |
sudo chown -R $(whoami):docker ~/.ivy2
sudo chown -R $(whoami):docker ~/.cache
sudo chown -R $(whoami):docker ${{ github.workspace }}

0 comments on commit 8338df5

Please sign in to comment.