Skip to content

Commit

Permalink
chore: refactore to new publishing service
Browse files Browse the repository at this point in the history
  • Loading branch information
stigbd committed Sep 22, 2022
1 parent 249910f commit b76d56a
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 34 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/adocs-build-and-publish-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build adocs and publish develop to github pages

on:
push:
branches:
- develop
paths:
- docs/**

jobs:
adoc_build:
runs-on: ubuntu-18.04
name: asciidoctor build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build html
id: adocbuild
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor -D docs -o index.html -a lang=nb docs/main.adoc"
- name: Build pdf
id: adocbuild_pdf
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor-pdf -D docs -o files/skos-ap-no-begrep.pdf -a lang=nb docs/main.adoc"
continue-on-error: true
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
52 changes: 52 additions & 0 deletions .github/workflows/adocs-build-and-publish-v1-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build adocs and publish v1 to production

on:
push:
branches:
- v1
paths:
- docs/**
workflow_dispatch:

jobs:
adoc_build:
runs-on: ubuntu-latest
name: asciidoctor build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build html
id: adocbuild
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor -D docs -o index.html -a lang=nb docs/main.adoc"

- name: Build pdf
id: adocbuild_pdf
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor-pdf -D docs -o files/skos-ap-no-begrep.pdf -a lang=nb docs/main.adoc"
continue-on-error: true

- name: Upload rdf to static-rdf-server
uses: Informasjonsforvaltning/upload-files-to-static-rdf-server-action@v3.1.0
id: upload-rdf
with:
ontology-type: "specification"
ontology: "skos-ap-no-begrep"
host: "https://fellesdatakatalog.digdir.no"
api-key: ${{ secrets.STATIC_RDF_SERVER_API_KEY }}
files: |
docs/index.html text/html nb
docs/files/skos-ap-no-begrep.pdf application/pdf nb files/skos-ap-no-begrep.pdf
docs/files/Mal-tilbakemeldinger.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document nb files/Mal-tilbakemeldinger.docx
docs/images/Digdir.png image/png nb images/Digdir.png
docs/images/RDF-eksempel-assosiativrelasjon.png image/png nb images/RDF-eksempel-assosiativrelasjon.png
docs/images/RDF-eksempel-definisjon-1.png image/png nb images/RDF-eksempel-definisjon-1.png
docs/images/RDF-eksempel-definisjon-2.png image/png nb images/RDF-eksempel-definisjon-2.png
docs/images/RDF-eksempel-partitivrelasjon.png image/png nb images/RDF-eksempel-partitivrelasjon.png
docs/images/SKOS-AP-NO-Begrep-kun-med-begrepsrelasjoner.png image/png nb images/SKOS-AP-NO-Begrep-kun-med-begrepsrelasjoner.png
docs/images/SKOS-AP-NO-Begrep-kun-obligatoriske.png image/png nb images/SKOS-AP-NO-Begrep-kun-obligatoriske.png
docs/images/SKOS-AP-NO-Begrep-uten-relasjoner.png image/png nb images/SKOS-AP-NO-Begrep-uten-relasjoner.png
52 changes: 52 additions & 0 deletions .github/workflows/adocs-build-and-publish-v1-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build adocs and publish v1 to staging

on:
push:
branches:
- v1
paths:
- docs/**
workflow_dispatch:

jobs:
adoc_build:
runs-on: ubuntu-latest
name: asciidoctor build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build html
id: adocbuild
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor -D docs -o index.html -a lang=nb docs/main.adoc"

- name: Build pdf
id: adocbuild_pdf
uses: avattathil/asciidoctor-action@master
with:
program: "asciidoctor-pdf -D docs -o files/skos-ap-no-begrep.pdf -a lang=nb docs/main.adoc"
continue-on-error: true

- name: Upload rdf to static-rdf-server
uses: Informasjonsforvaltning/upload-files-to-static-rdf-server-action@v3.1.0
id: upload-rdf
with:
ontology-type: "specification"
ontology: "skos-ap-no-begrep"
host: "https://staging.fellesdatakatalog.digdir.no"
api-key: ${{ secrets.STATIC_RDF_SERVER_API_KEY_STAGING }}
files: |
docs/index.html text/html nb
docs/files/skos-ap-no-begrep.pdf application/pdf nb files/skos-ap-no-begrep.pdf
docs/files/Mal-tilbakemeldinger.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document nb files/Mal-tilbakemeldinger.docx
docs/images/Digdir.png image/png nb images/Digdir.png
docs/images/RDF-eksempel-assosiativrelasjon.png image/png nb images/RDF-eksempel-assosiativrelasjon.png
docs/images/RDF-eksempel-definisjon-1.png image/png nb images/RDF-eksempel-definisjon-1.png
docs/images/RDF-eksempel-definisjon-2.png image/png nb images/RDF-eksempel-definisjon-2.png
docs/images/RDF-eksempel-partitivrelasjon.png image/png nb images/RDF-eksempel-partitivrelasjon.png
docs/images/SKOS-AP-NO-Begrep-kun-med-begrepsrelasjoner.png image/png nb images/SKOS-AP-NO-Begrep-kun-med-begrepsrelasjoner.png
docs/images/SKOS-AP-NO-Begrep-kun-obligatoriske.png image/png nb images/SKOS-AP-NO-Begrep-kun-obligatoriske.png
docs/images/SKOS-AP-NO-Begrep-uten-relasjoner.png image/png nb images/SKOS-AP-NO-Begrep-uten-relasjoner.png
32 changes: 0 additions & 32 deletions .github/workflows/adocs-build-develop.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/shared/download.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ifeval::["{backend}" == "html5"]

[TIP]
//.Nedlasting av dokumentet
Dette dokumentet kan også lastes ned link:skos-ap-no-begrep.pdf[som PDF].
Dette dokumentet kan også lastes ned link:files/skos-ap-no-begrep.pdf[som PDF].
// Dersom det oppleves problemer med nedlastet utgave, eksempelvis bilder som mangler eller lenker som ikke fungerer, ber vi om at man benytter versjonen tilgjengelig på nett for de aktuelle delene.

endif::[]
1 change: 0 additions & 1 deletion ontology/.~lock.skosno.ttl#

This file was deleted.

0 comments on commit b76d56a

Please sign in to comment.