-
Notifications
You must be signed in to change notification settings - Fork 70
84 lines (77 loc) · 2.59 KB
/
deploy-to-obs-landing.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: deploy-to-obs-landing
on:
push:
branches:
- master
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/deploy-to-obs-landing.yaml'
- '.travis.yml'
- 'Dockerfile'
- 'Dockerfile.base'
- 'README.md'
- 'docker-compose.override.yml.example'
- 'docker-compose.yml'
jobs:
build-obs-docs:
runs-on: ubuntu-latest
steps:
- name: Setup SSH Client
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
- name: Checkout obs-landing repo
uses: actions/checkout@v4
with:
repository: openSUSE/obs-landing
path: obs-landing
ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
- name: install daps2docker
run: |
git clone [email protected]:openSUSE/daps2docker.git
- name: validate
run: |
pushd daps2docker
for doc in obs-admin-guide obs-user-guide; do
source ../DC-$doc || exit 1
./daps2docker.sh ../DC-$doc validate
done
- name: build html
run: |
pushd daps2docker
for doc in obs-admin-guide obs-user-guide; do
source ../DC-$doc || exit 1
./daps2docker.sh ../DC-$doc html || exit 1
rm -rf ../obs-landing/help/manuals/${doc} || exit 1
mv -v /tmp/daps2docker-*/$doc/html/${ROOTID} ../obs-landing/help/manuals/${doc} || exit 1
done
- name: build pdf
run: |
pushd daps2docker
for doc in obs-admin-guide obs-user-guide; do
source ../DC-$doc || exit 1
./daps2docker.sh ../DC-$doc pdf || exit 1
# update pdf
mv -v /tmp/daps2docker-*/$doc/${ROOTID}_en.pdf ../obs-landing/files/manuals/${doc}.pdf || exit 1
done
- name: build epub
run: |
pushd daps2docker
for doc in obs-admin-guide obs-user-guide; do
source ../DC-$doc || exit 1
./daps2docker.sh ../DC-$doc epub || exit 1
# update epub
mv -v /tmp/daps2docker-*/$doc/${ROOTID}_en.epub ../obs-landing/files/manuals/${doc}.epub || exit 1
done
- name: Commit files
run: |
pushd obs-landing
git config --local user.email "[email protected]"
git config --local user.name "obs-docs-deployment"
git add -A
git commit -m "Update books to current state"
git push