-
Notifications
You must be signed in to change notification settings - Fork 12
93 lines (81 loc) · 2.05 KB
/
build.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
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
85
86
87
88
89
90
91
92
93
name: SmallRye Website
on:
push:
branches:
- develop
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
pull_request:
branches:
- develop
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
jobs:
build:
runs-on: ubuntu-latest
services:
kroki:
image: yuzutech/kroki
env:
KROKI_MERMAID_HOST: kroki-mermaid
ports:
- 8000:8000
kroki-mermaid:
image: yuzutech/kroki-mermaid
steps:
- name: checkout
uses: actions/checkout@v4
- name: set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: generate website
env:
JEKYLL_ENV: production
run: |
mkdir website
bundle install
bundle exec jekyll build --destination website
- name: generate docs
run: |
cd docs
npm i @antora/[email protected] @antora/[email protected] asciidoctor-kroki
./node_modules/@antora/cli/bin/antora antora generate antora-playbook.yml
cd ..
cp -r docs/build/site website/docs
- name: attach website
uses: actions/upload-artifact@v4
with:
name: website
path: website
deploy:
needs: [build]
if: github.event_name == 'push' && github.repository_owner == 'smallrye'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: main
token: ${{secrets.RELEASE_TOKEN}}
- name: extract website
uses: actions/download-artifact@v4
with:
name: website
- name: push website
run: |
git config --global user.name "SmallRye CI"
git config --global user.email "[email protected]"
git status
git diff
git add -A .
git commit -m "CI: Build and deploy website updates"
git push --force