Update deploy.yml #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Deploy Combined Docs | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout umbrella repo | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# 2. Checkout the AAS specs meta-repo | |
- name: Checkout AAS Specs | |
uses: actions/checkout@v3 | |
with: | |
repository: admin-shell-io/aas-specs-antora | |
path: aas-specs-antora | |
# 3. Checkout the Submodel Templates repo | |
- name: Checkout Submodel Templates | |
uses: actions/checkout@v3 | |
with: | |
repository: admin-shell-io/submodel-templates-antora | |
path: submodel-templates | |
# 4. Set up Node.js & install Antora + extensions + loader + kroki | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Antora toolchain | |
run: | | |
npm install --no-audit --prefer-offline \ | |
@antora/cli \ | |
@antora/site-generator-default \ | |
@antora/[email protected] \ | |
@antora/[email protected] \ | |
@antora/[email protected] \ | |
asciidoctor-kroki | |
- name: Ensure Antora CLI is executable | |
run: chmod +x ./node_modules/.bin/antora | |
# 5. Build AAS Specs site | |
- name: Build AAS Specs | |
working-directory: aas-specs-antora | |
run: | | |
npx antora antora-playbook.yml --to-dir=../build/site/aas-specs-antora | |
# 6. Build Submodel Templates site | |
- name: Build Submodel Templates | |
working-directory: submodel-templates-antora | |
run: | | |
npx antora antora-playbook.yml --to-dir=../build/site/submodel-templates-antora | |
# 7. Copy umbrella index.html into the combined site | |
- name: Copy Dashboard | |
run: | | |
mkdir -p build/site | |
cp index.html build/site/index.html | |
# 8. Deploy the entire build/site folder to Pages | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: build/site | |
publish_branch: gh-pages |