|
1 |
| -name: Build & Deploy Docs Site |
| 1 | +name: Build & Deploy Combined Docs |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
9 | 9 | build-and-deploy:
|
10 | 10 | runs-on: ubuntu-latest
|
11 | 11 | steps:
|
| 12 | + # 1. Checkout umbrella repo |
12 | 13 | - uses: actions/checkout@v3
|
| 14 | + with: |
| 15 | + fetch-depth: 0 # in case you need history for edits |
| 16 | + |
| 17 | + # 2. Checkout the AAS specs meta-repo |
| 18 | + - name: Checkout AAS Specs |
| 19 | + uses: actions/checkout@v3 |
| 20 | + with: |
| 21 | + repository: admin-shell-io/aas-specs-antora |
| 22 | + path: aas-specs-antora |
| 23 | + |
| 24 | + # 3. Checkout the Submodel Templates repo |
| 25 | + - name: Checkout Submodel Templates |
| 26 | + uses: actions/checkout@v3 |
| 27 | + with: |
| 28 | + repository: admin-shell-io/submodel-templates-antora |
| 29 | + path: submodel-templates |
13 | 30 |
|
14 |
| - # 1. Initialize npm & install local dev-deps |
15 |
| - - name: Set up Node.js and install Antora |
| 31 | + # 4. Set up Node.js & install Antora + extensions + loader + kroki |
| 32 | + - name: Setup Node.js |
16 | 33 | uses: actions/setup-node@v3
|
17 | 34 | with:
|
18 |
| - node-version: '18' # or whatever LTS you prefer |
19 |
| - - run: | |
20 |
| - npm ci # installs @antora/cli & @antora/site-generator-default |
21 |
| - # 2. Build the site |
22 |
| - - name: Build with Antora |
23 |
| - run: npx antora antora-playbook.yml --to-dir=build/site |
24 |
| - # 3. Deploy |
| 35 | + node-version: 18 |
| 36 | + - name: Install Antora toolchain |
| 37 | + run: npm ci |
| 38 | + |
| 39 | + # 5. Build AAS Specs site |
| 40 | + - name: Build AAS Specs |
| 41 | + working-directory: aas-specs-antora |
| 42 | + run: | |
| 43 | + # uses the playbook *in* that repo |
| 44 | + npx antora antora-playbook.yml --to-dir=../build/site/aas-specs-antora |
| 45 | +
|
| 46 | + # 6. Build Submodel Templates site |
| 47 | + - name: Build Submodel Templates |
| 48 | + working-directory: submodel-templates |
| 49 | + run: | |
| 50 | + # assumes there's a playbook at the root of submodel-templates |
| 51 | + npx antora antora-playbook.yml --to-dir=../build/site/submodel-templates |
| 52 | +
|
| 53 | + # 7. Copy umbrella index.html into the combined site |
| 54 | + - name: Copy Dashboard |
| 55 | + run: | |
| 56 | + mkdir -p build/site |
| 57 | + cp index.html build/site/index.html |
| 58 | +
|
| 59 | + # 8. Deploy the entire build/site folder to Pages |
25 | 60 | - name: Deploy to GitHub Pages
|
26 | 61 | uses: peaceiris/actions-gh-pages@v3
|
27 | 62 | with:
|
28 | 63 | github_token: ${{ secrets.GITHUB_TOKEN }}
|
29 | 64 | publish_dir: build/site
|
30 |
| - # or omit to default to gh-pages |
| 65 | + publish_branch: gh-pages |
0 commit comments