-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.04 KB
/
publish.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
name: Publish
"on":
push:
branches:
- main
tags:
- v*
concurrency:
group: "publish-${{ github.ref }}"
cancel-in-progress: true
jobs:
publish-gh-pages:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Bump version to next (if not tagged)
if: "startsWith(github.ref, 'refs/heads/')"
run: |
echo next > version
- name: Build ontology
run: |
make build
- name: Retrieve version
id: version
run: |
version=$(cat version)
major=$(echo $version | cut -d. -f1)
echo "::set-output name=version::$version"
echo "::set-output name=major::$major"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.OPS_TOKEN }}
publish_dir: target/ontology/v${{ steps.version.outputs.major }}
destination_dir: ./v${{ steps.version.outputs.major }}
keep_files: false