fix date #1
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: deploy-live-doc | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '**.ttl' # only when the ttl file is modified | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages and push back in repo | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: docs # checkout on docs branch for using deployment tools | |
fetch-depth: 0 # Fetch all history as we need some back-and-forth between branches | |
- name: rebase # using ontology file (on dev-2 branch) for the build process (on tmp branch) | |
id: rebase | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git checkout --progress --force -B dev-2 refs/remotes/origin/dev-2 | |
git checkout docs | |
git checkout --progress --force -B tmp | |
git rebase dev-2 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' # See 'Supported distributions' for available options | |
java-version: '11' | |
- name: Build documentation | |
run: make build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs | |
- name: Push # commit the output files on tmp branch and push it back to the repo via the untouched docs branch | |
run: | | |
git add . | |
git commit -m "generated: live doc" | |
git checkout docs | |
git cherry-pick tmp | |
git push | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |