-
Notifications
You must be signed in to change notification settings - Fork 131
35 lines (33 loc) · 1.07 KB
/
publish-website.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
name: Publish website
on:
workflow_dispatch: {}
jobs:
publish:
name: Publish website
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v14
with:
java-version: zulu@1.14
- name: Print versions
run: |
java -version
- name: Update website
env:
MICROSITE_PUBLISH_TOKEN: ${{ secrets.MICROSITE_PUBLISH_TOKEN }}
run: |
git clone "https://git:$MICROSITE_PUBLISH_TOKEN@github.com/guardrail-dev/guardrail.git" --branch=gh-pages gh-pages && \
pushd gh-pages && \
git rm -rf . && \
git config user.email "hello@guardrail.dev" && \
git config user.name "guardrail website builder" && \
popd && \
sbt microsite/mdoc && \
tar -cC modules/microsite/target/mdoc/ . | tar -vxC gh-pages && \
pushd gh-pages && \
git add . && \
git commit -m "Updating ${{ github.ref_name }}" && \
git push