-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (48 loc) · 1.68 KB
/
publish-prod.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
53
54
55
56
57
58
# Build and publish documentation
name: publish-prod
# Controls when the workflow will run
on:
push:
branches:
- master
workflow_dispatch:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
PRODUCT: total
steps:
- uses: actions/checkout@v2
- name: Submodule update
run: |
git submodule update --init --recursive
git submodule foreach git pull origin master
- name: Install Hugo
run: |
curl -LO https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_Linux-64bit.deb
sudo dpkg -i hugo_extended_0.101.0_Linux-64bit.deb
- name: Run and build Hugo
run: |
mkdir -p common/content/${{ env.PRODUCT }}
cp -r java common/content/${{ env.PRODUCT }}
cp -r net common/content/${{ env.PRODUCT }}
cp _index.md common/content/${{ env.PRODUCT }}
hugo --source common --minify --config config-geekdoc.toml,show-feedback-config.toml
- name: Deploy sitemap
uses: nogsantos/scp-deploy@master
with:
src: common/public/product-sitemap.xml
host: ${{ secrets.DOCS_SSH_HOST }}
remote: ${{ secrets.DOCS_SSH_DIR }}/sitemaps/${{ env.PRODUCT }}.xml
user: ${{ secrets.DOCS_SSH_USER }}
key: ${{ secrets.DOCS_SSH_KEY }}
- name: Deploy documentation
uses: nogsantos/scp-deploy@master
with:
src: common/public/${{ env.PRODUCT }}
host: ${{ secrets.DOCS_SSH_HOST }}
remote: ${{ secrets.DOCS_SSH_DIR }}
user: ${{ secrets.DOCS_SSH_USER }}
key: ${{ secrets.DOCS_SSH_KEY }}