Skip to content

Merge pull request #7 from matsev/dependabot/github_actions/actions/c… #17

Merge pull request #7 from matsev/dependabot/github_actions/actions/c…

Merge pull request #7 from matsev/dependabot/github_actions/actions/c… #17

name: Build and deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
container:
image: asciidoctor/docker-asciidoctor:1.18
volumes:
# /documents/ is the default working directory of the docker-asciidoctor container
- ${{ github.workspace }}:/documents/
env:
BUILD_PATH: target
DEPLOY_PATH: _site
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Generate html 🏗
run: >
asciidoctor
--require asciidoctor-diagram
--destination-dir ${{ env.BUILD_PATH }}
docs/index.adoc
- name: Generate pdf 🏗
run: >
asciidoctor-pdf
--require asciidoctor-diagram
--destination-dir ${{ env.BUILD_PATH }}
docs/index.adoc
- name: Copy artifacts 🚚
run: >
apk add rsync &&
rsync -av --exclude=".*" ${{ env.BUILD_PATH }}/ ${{ env.DEPLOY_PATH }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ${{ env.DEPLOY_PATH }}