-
Notifications
You must be signed in to change notification settings - Fork 12
53 lines (49 loc) · 1.79 KB
/
build-ls-bus.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
name: Build Layered Standard Network Communication
on:
push:
branches-ignore: [ 'temp/*' ]
tags:
- '*'
pull_request:
branches: [ main ]
jobs:
build-ls-bus:
name: Build Layered Standard Network Communication
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: Generate revnumber
run: |
[[ $GITHUB_REF_TYPE == "tag" ]] && REVNUMBER=${GITHUB_REF:11} || REVNUMBER=${GITHUB_SHA:0:7}
echo GITHUB_SHA: $GITHUB_SHA
echo GITHUB_REF_TYPE: $GITHUB_REF_TYPE
echo GITHUB_REF: $GITHUB_REF
echo REVNUMBER: $REVNUMBER
echo "REVNUMBER=$REVNUMBER" >> $GITHUB_ENV
- name: prepare
run: mkdir build
- name: build layered standard Network Communication
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor -D build --backend=html5 --attribute=revnumber=${{ env.REVNUMBER }} --attribute=revdate=$(date +%F) docs/index.adoc"
- name: copy images, examples, headers, schemas and LICENSE.txt
run: tar cfC - docs images examples ../headers ../schema ../LICENSE.txt | tar xfC - build
- name: archive layered standard Network Communication
uses: actions/upload-artifact@v3
with:
name: FMI-LS-BUS
path: build/*
if-no-files-found: error
- name: extract branch name
id: extract_branch
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build
destination_dir: ${{ steps.extract_branch.outputs.branch }}
enable_jekyll: true