-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (23 loc) · 989 Bytes
/
ci.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
name: Build and publish the documentation
on: [push]
jobs:
build:
name: Build
runs-on: Linux
steps:
- uses: actions/checkout@v3
- name: Build
run: cd "$GITHUB_WORKSPACE"; make EXTERNAL_CONTAINER_IMG="$DOC_CONTAINER_IMG"
- name: Publish-revision
run: cd "$GITHUB_WORKSPACE"; rsync -av --delete --exclude='.asciidoctor/' output/ "$DOC_REV_PREFIX"/"$GITHUB_SHA"/
- name: Publish-revision-by-date
run: ln -sfn "$DOC_REV_PREFIX"/"$GITHUB_SHA" "$DOC_REV_PREFIX"/by-date/$(date -Iseconds)
- name: Publish-revision-by-branch
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: ln -sfn "$DOC_REV_PREFIX"/"$GITHUB_SHA" "$DOC_REV_PREFIX"/by-branch/"$BRANCH_NAME"
- name: Publish-master
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
if: ${{ env.BRANCH_NAME == 'master' }}
run: ln -sfn "$DOC_REV_PREFIX"/"$GITHUB_SHA" "$DOC_TARGET"