Merge pull request #44 from AtomGraph/develop #2
This file contains hidden or 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 Docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'docs/**' | |
| workflow_dispatch: | |
| jobs: | |
| publish-docs: | |
| name: Transform and publish documentation | |
| runs-on: ubuntu-latest | |
| env: | |
| ASF_ARCHIVE: https://archive.apache.org/dist/ | |
| JENA_VERSION: 6.0.0 | |
| steps: | |
| - name: Checkout LinkedDataHub-Apps | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Install Linux packages | |
| run: sudo apt-get update && sudo apt-get install -y xmlstarlet | |
| - name: Download Apache Jena | |
| run: | | |
| curl -sS --fail \ | |
| "${{ env.ASF_ARCHIVE }}jena/binaries/apache-jena-${{ env.JENA_VERSION }}.tar.gz" \ | |
| -o "${{ runner.temp }}/jena.tar.gz" | |
| - name: Unpack Jena | |
| run: tar -zxf jena.tar.gz | |
| working-directory: ${{ runner.temp }} | |
| - name: Add Jena bin to PATH | |
| run: echo "${{ runner.temp }}/apache-jena-${{ env.JENA_VERSION }}/bin" >> $GITHUB_PATH | |
| - name: Pull Saxon Docker image | |
| run: docker pull atomgraph/saxon | |
| - name: Run documentation transformation | |
| run: ./ttl-to-html.sh | |
| working-directory: docs | |
| - name: Deploy to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| personal_token: ${{ secrets.GH_PAGES_TOKEN }} | |
| external_repository: AtomGraph/LinkedDataHub | |
| publish_branch: gh-pages | |
| publish_dir: docs/html | |
| destination_dir: linkeddatahub/docs | |
| keep_files: true | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: 'Update docs from LinkedDataHub-Apps@${{ github.sha }}' |