Skip to content

ASAM Project Guide build #1304

ASAM Project Guide build

ASAM Project Guide build #1304

Workflow file for this run

name: ASAM Project Guide build
on:
# create: # new branches or tags
# release: # new releases
# pull_request:
push: # on push
branches:
- main
- office-review-changes
workflow_dispatch: # manual trigger
repository_dispatch: #api trigger
types: [content-update]
jobs:
build:
name: Build the ASAM project guide and deploy it to gh-pages
runs-on: ubuntu-20.04
services:
kroki:
image: yuzutech/kroki:0.15.1
env:
KROKI_MAX_URI_LENGTH: 8000
KROKI_BLOCKDIAG_HOST: blockdiag
KROKI_MERMAID_HOST: mermaid
blockdiag:
image: yuzutech/kroki-blockdiag:0.15.1
mermaid:
image: yuzutech/kroki-mermaid:0.15.1
steps:
# checkout repo into folder guide. This is done to match the setup for the local build in docker-compose
- name: Checkout
uses: actions/checkout@v3
with:
path: repo
# submodules: 'true'
# token: ${{ secrets.ASAM_ANTORA_EXTENSIONS }}
fetch-depth: 0 # test if depth in fetch history is required
- name: Submodules
working-directory: repo
env:
ASAM_ANTORA_EXTENSIONS: ${{ secrets.ASAM_ANTORA_EXTENSIONS }}
# run: |
# sed -i "s/https\:\/\/code.asam.net\/common\/asam-antora-extensions/https\:\/\/asam-antora-extensions\:$ASAM_ANTORA_EXTENSIONS\@code.asam.net\/commmon\/asam-antora-extensions/" .gitmodules
# cat .gitmodules
# git submodule init
# git submodule update
run: git clone https://asam-antora-extensions:$ASAM_ANTORA_EXTENSIONS@code.asam.net/common/asam-antora-extensions.git
# build site
- name: Generate site
uses: docker://ghcr.io/asam-ev/project-guide-docker:4
with:
entrypoint: sh
args: repo/run-build.sh
# deploy to gh-pages
# - name: deploy to gh-pages if push to main branch
- name: deploy to gh-pages after success
# if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./repo/site