Merge pull request #322 from axone-protocol/build/new-years-bump #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |