-
Notifications
You must be signed in to change notification settings - Fork 11
38 lines (35 loc) · 1.19 KB
/
guide-website-update.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
name: Guide Web Site Deploy
on:
push:
branches: master
paths:
- 'home/**'
- 'antora-playbook.yml'
jobs:
antora:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
with:
repository: hazelcast-guides/guides-site
ref: master
token: ${{ secrets.SECRET_TOKEN }}
- name: Install Antora
run: |
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt -y install nodejs
sudo npm i -g @antora/[email protected] @antora/[email protected]
- name: Build website artifacts
run: |
sh create.sh
- name: Commit artifacts changes
run: |
git config --global user.name 'devOpsHazelcast'
git config --global user.email '[email protected]'
export GUIDE_REPO=$(cut -d/ -f2 <<<"${GITHUB_REPOSITORY}")
export COMMIT_ID=$(git rev-parse --short "$GITHUB_SHA")
git add docs
git commit -m "${GUIDE_REPO}-${COMMIT_ID} guide update"
- name: Push artifacts to guides-site repo
run: git push