-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.32 KB
/
publish-github-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 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 }}