-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (50 loc) · 1.6 KB
/
gh-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
48
49
50
51
52
name: Publish To Github Pages
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
concurrency: ${{github.ref}}
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages
fetch-depth: 0 # Need the git history for sbt-dynver to determine the version
- name: Up Merge
run: |
git log --max-count=1 --format=format:%an | xargs -0 -n 1 git config --global -- user.name &&
git log --max-count=1 --format=format:%ae | xargs -0 -n 1 git config --global -- user.email &&
git config --global push.default simple &&
git config --global pull.rebase false &&
git pull --no-edit -X ours ${{github.server_url}}/${{github.repository}} ${{github.ref_name}}
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- id: nodenv
uses: nodenv/actions/node-version@v2
- uses: actions/setup-node@v1
with:
node-version: "${{ steps.nodenv.outputs.node-version }}"
- name: Cache SBT
uses: actions/cache@v2
with:
path: |
~/.ivy2/local/
~/.ivy2/cache/
~/.sbt/
~/.coursier/
key: |
${{ runner.os }}-${{matrix.scala}}-${{ hashFiles('**/*.sbt') }}
${{ runner.os }}-${{matrix.scala}}-
- name: Build
run: sbt "set scalaJSStage in js := FullOptStage" indexHtml
- name: Deploy
run: |
git rm --ignore-unmatch -r .github &&
git add . &&
git commit -m 'Publish to GitHub Pages' &&
git push origin gh-pages:gh-pages