Skip to content

publish to <gh-pages> #14

publish to <gh-pages>

publish to <gh-pages> #14

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/*
lexfcs:
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 lexfcs.html lexfcs/index.adoc
- name: Build PDF
run: asciidoctor-pdf -v -D docs -o lexfcs.pdf lexfcs/index.adoc
- name: Copy attachments
run: cp -R lexfcs/attachments docs/
- name: Store results
uses: actions/upload-artifact@v4
with:
name: lexfcs-specs
path: docs/*
fcs-endpoint-dev-tutorial:
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-endpoint-dev-tutorial.html fcs-endpoint-dev-tutorial/index.adoc
- name: Build PDF
run: asciidoctor-pdf -v -D docs -o fcs-endpoint-dev-tutorial.pdf fcs-endpoint-dev-tutorial/index.adoc
- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-endpoint-dev-tutorial
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/*
fcs-endpoint-dev-slides-as-doc:
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-endpoint-dev-slides.html fcs-endpoint-dev-slides/index.adoc
#- name: Build PDF
# run: asciidoctor-pdf -v -D docs -o fcs-endpoint-dev-slides.pdf fcs-endpoint-dev-slides/index.adoc
- name: Store results
uses: actions/upload-artifact@v4
with:
name: fcs-endpoint-dev-slides-docs
path: docs/*
publish:
runs-on: ubuntu-latest
needs:
[
fcs-core-2-0,
fcs-core-1-0,
fcs-dataviews-1-0,
fcs-aai,
lexfcs,
fcs-endpoint-dev-tutorial,
fcs-endpoint-dev-slides,
fcs-endpoint-dev-slides-as-doc,
]
steps:
- uses: actions/checkout@v4
- name: Fetch build artifacts
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/* static/
sed -i 's/###BUILDDATE###/'"$(date '+%Y-%m-%d %H:%M:%S %Z')"'/g' static/index.html
cd static
git init -b main
git config user.name $GITHUB_ACTOR
git config user.email $GITHUB_ACTOR@users.noreply.github.com
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() }}