Skip to content

Commit

Permalink
Add gh-pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Querela committed Apr 9, 2024
1 parent 22db6a5 commit 10100e6
Show file tree
Hide file tree
Showing 8 changed files with 546 additions and 7 deletions.
388 changes: 388 additions & 0 deletions .github/pages/index-for-clarin.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .github/workflows/build-fcs-aai-adoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- 'fcs-aai/**'
- '.github/workflows/build-fcs-aai-adoc.yml'
workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-fcs-core-1.0-adoc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build <fcs-core-1.0> adocs
name: build <fcs-core-1.0> adocs

on:
push:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-fcs-core-2.0-adoc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build <fcs-core-2.0> adocs
name: build <fcs-core-2.0> adocs

on:
push:
Expand All @@ -9,7 +9,6 @@ on:
- 'fcs-core-2.0/**'
- '.github/workflows/build-fcs-core-2.0-adoc.yml'
workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-fcs-dataviews-adoc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build <fcs-dataviews-1.0> adocs
name: build <fcs-dataviews-1.0> adocs

on:
push:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-fcs-endpoint-dev-slides-adoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- 'fcs-endpoint-dev-slides/**'
- '.github/workflows/build-fcs-endpoint-dev-slides-adoc.yml'
workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-fcs-endpoint-dev-tutorial-adoc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build <fcs-endpoint-dev-tutorial> adocs
name: build <fcs-endpoint-dev-tutorial> adocs

on:
push:
Expand Down
154 changes: 154 additions & 0 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: publish to <gh-pages>

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

fcs-core-1-0:
runs-on: ubuntu-latest
container: asciidoctor/docker-asciidoctor

steps:
- uses: actions/checkout@v4

- name: Build HTML
run: asciidoctor -v -D docs -a data-uri --backend=html5 -o fcs-core-1.0.html fcs-core-1.0/index.adoc

- name: Build PDF
run: asciidoctor-pdf -v -D docs -o fcs-core-1.0.pdf fcs-core-1.0/index.adoc

- name: Copy attachments
run: cp -R fcs-core-1.0/attachments docs/

- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-core-1.0-specs
path: docs/*

fcs-core-2-0:
runs-on: ubuntu-latest
container: asciidoctor/docker-asciidoctor

steps:
- uses: actions/checkout@v4

- name: Build HTML
run: asciidoctor -v -D docs -a data-uri --backend=html5 -o fcs-core-2.0.html fcs-core-2.0/index.adoc

- name: Build PDF
run: asciidoctor-pdf -v -D docs -o fcs-core-2.0.pdf fcs-core-2.0/index.adoc

- name: Copy attachments
run: cp -R fcs-core-2.0/attachments docs/

- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-core-2.0-specs
path: docs/*

fcs-dataviews-1-0:
runs-on: ubuntu-latest
container: asciidoctor/docker-asciidoctor

steps:
- uses: actions/checkout@v4

- name: Build HTML
run: asciidoctor -v -D docs -a data-uri --backend=html5 -o fcs-dataviews-1.0.html fcs-dataviews-1.0/index.adoc

- name: Build PDF
run: asciidoctor-pdf -v -D docs -o fcs-dataviews-1.0.pdf fcs-dataviews-1.0/index.adoc

- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-dataviews-1.0-specs
path: docs/*

fcs-aai:
runs-on: ubuntu-latest
container: asciidoctor/docker-asciidoctor

steps:
- uses: actions/checkout@v4

- name: Build HTML
run: asciidoctor -v -D docs -a data-uri --backend=html5 -o fcs-aai.html fcs-aai/index.adoc

- name: Build PDF
run: asciidoctor-pdf -v -D docs -o fcs-aai.pdf fcs-aai/index.adoc

- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-aai-specs
path: docs/*

fcs-endpoint-dev-slides:
runs-on: ubuntu-latest
container: asciidoctor/docker-asciidoctor

steps:
- uses: actions/checkout@v4

- name: Setup reveal.js
run: |
git clone -b 4.1.2 --depth 1 https://github.com/hakimel/reveal.js.git
mkdir -p slides/reveal.js
mv reveal.js/dist slides/reveal.js/
mv reveal.js/plugin slides/reveal.js/
- name: Setup highlight.js for reveal.js
run: |
git clone -b 10.7.3 --depth 1 https://github.com/highlightjs/highlight.js.git
cp highlight.js/src/styles/github.css slides/reveal.js/plugin/highlight/
cp highlight.js/src/styles/idea.css slides/reveal.js/plugin/highlight/
cp highlight.js/src/styles/magula.css slides/reveal.js/plugin/highlight/
- name: Build slides
run: asciidoctor-revealjs -v -D slides -o index.html fcs-endpoint-dev-slides/index.adoc

- name: Copy slide resources
run: |
mv -v fcs-endpoint-dev-slides/images slides/
mv -v fcs-endpoint-dev-slides/css slides/
- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-endpoint-dev-slides
path: slides/*

publish:
runs-on: ubuntu-latest
needs: [ fcs-aai, fcs-core-1-0, fcs-core-2-0, fcs-dataviews-1-0, fcs-endpoint-dev-slides ]

steps:
- uses: actions/checkout@v4

- name: Fetch results <fcs-endpoint-dev-slides>
uses: actions/download-artifact@v4
with:
path: build

- name: Push generated files to branch 'gh-pages'
run: |
mkdir -p static
mv -v build/* static
mv -v .github/pages/index-for-clarin.html static/index.html
cd static
git init -b main
git config user.name $GITHUB_ACTOR
git config user.email [email protected]
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add .
git commit -m "[release] Publish on GitHub Pages"
git push --force origin main:gh-pages
if: ${{ success() }}

0 comments on commit 10100e6

Please sign in to comment.