Update deploy.yml #14
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 AAS Specs source (main branch) | |
- name: Checkout AAS Specs source | |
uses: actions/checkout@v3 | |
with: | |
repository: admin-shell-io/aas-specs-antora | |
path: aas-specs-antora | |
# 3. Checkout Submodel Templates source (main branch) | |
- name: Checkout Submodel Templates source | |
uses: actions/checkout@v3 | |
with: | |
repository: admin-shell-io/submodel-templates-antora | |
path: submodel-templates-antora | |
# 4. Set up Node.js and install Antora toolchain + extensions | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Antora CLI and extensions | |
run: | | |
npm install --no-audit --prefer-offline \ | |
@antora/cli \ | |
@antora/site-generator-default \ | |
@antora/[email protected] \ | |
@antora/[email protected] \ | |
@antora/[email protected] \ | |
asciidoctor-kroki | |
chmod +x ./node_modules/.bin/antora | |
# 5. Build AAS Specs using its playbook | |
- name: Build AAS Specs site | |
run: | | |
npx antora aas-specs-antora/antora-playbook.yml --to-dir=build/site/aas-specs-antora | |
# 6. Build Submodel Templates using its playbook | |
- name: Build Submodel Templates site | |
run: | | |
npx antora submodel-templates-antora/antora-playbook.yml --to-dir=build/site/submodel-templates-antora | |
# 7. Copy umbrella dashboard index | |
- name: Copy Dashboard | |
run: | | |
mkdir -p build/site | |
cp index.html build/site/index.html | |
# 8. Deploy combined site to GitHub 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 |