|
| 1 | + name: Publish Docs |
| 2 | + |
| 3 | + on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + paths: |
| 8 | + - 'docs/**' |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | + jobs: |
| 12 | + publish-docs: |
| 13 | + name: Transform and publish documentation |
| 14 | + runs-on: ubuntu-latest |
| 15 | + env: |
| 16 | + ASF_ARCHIVE: https://archive.apache.org/dist/ |
| 17 | + JENA_VERSION: 6.0.0 |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout LinkedDataHub-Apps |
| 21 | + uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Install Linux packages |
| 24 | + run: sudo apt-get update && sudo apt-get install -y xmlstarlet |
| 25 | + |
| 26 | + - name: Download Apache Jena |
| 27 | + run: | |
| 28 | + curl -sS --fail \ |
| 29 | + "${{ env.ASF_ARCHIVE }}jena/binaries/apache-jena-${{ env.JENA_VERSION }}.tar.gz" \ |
| 30 | + -o "${{ runner.temp }}/jena.tar.gz" |
| 31 | +
|
| 32 | + - name: Unpack Jena |
| 33 | + run: tar -zxf jena.tar.gz |
| 34 | + working-directory: ${{ runner.temp }} |
| 35 | + |
| 36 | + - name: Add Jena bin to PATH |
| 37 | + run: echo "${{ runner.temp }}/apache-jena-${{ env.JENA_VERSION }}/bin" >> $GITHUB_PATH |
| 38 | + |
| 39 | + - name: Pull Saxon Docker image |
| 40 | + run: docker pull atomgraph/saxon |
| 41 | + |
| 42 | + - name: Run documentation transformation |
| 43 | + run: ./ttl-to-html.sh |
| 44 | + working-directory: docs |
| 45 | + |
| 46 | + - name: Deploy to gh-pages |
| 47 | + uses: peaceiris/actions-gh-pages@v4 |
| 48 | + with: |
| 49 | + personal_token: ${{ secrets.GH_PAGES_TOKEN }} |
| 50 | + external_repository: AtomGraph/LinkedDataHub |
| 51 | + publish_branch: gh-pages |
| 52 | + publish_dir: docs/html |
| 53 | + destination_dir: linkeddatahub/docs |
| 54 | + keep_files: true |
| 55 | + user_name: 'github-actions[bot]' |
| 56 | + user_email: 'github-actions[bot]@users.noreply.github.com' |
| 57 | + commit_message: 'Update docs from LinkedDataHub-Apps@${{ github.sha }}' |
0 commit comments