|
5 | 5 | branches: [ main ]
|
6 | 6 | workflow_dispatch:
|
7 | 7 |
|
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
8 | 11 | jobs:
|
9 | 12 | build-and-deploy:
|
10 | 13 | runs-on: ubuntu-latest
|
@@ -33,37 +36,19 @@ jobs:
|
33 | 36 | uses: actions/setup-node@v3
|
34 | 37 | with:
|
35 | 38 | node-version: 18
|
36 |
| - - name: Install Antora CLI and extensions |
37 |
| - run: | |
38 |
| - npm install --no-audit --prefer-offline \ |
39 |
| - @antora/cli \ |
40 |
| - @antora/site-generator-default \ |
41 |
| - |
42 |
| - |
43 |
| - |
44 |
| - asciidoctor-kroki |
45 |
| - chmod +x ./node_modules/.bin/antora |
46 |
| -
|
47 |
| - # 5. Build AAS Specs using its playbook |
48 |
| - - name: Build AAS Specs site |
49 |
| - run: | |
50 |
| - npx antora aas-specifications/antora-playbook.yml --to-dir=build/site/aas-specifications |
51 |
| -
|
52 |
| - # 6. Build Submodel Templates using its playbook |
53 |
| - - name: Build Submodel Templates site |
54 |
| - run: | |
55 |
| - npx antora idta-submodel-templates/antora-playbook.yml --to-dir=build/site/idta-submodel-templates |
| 39 | + cache: 'npm' |
| 40 | + |
| 41 | + - name: Install dependencies |
| 42 | + run: npm ci |
56 | 43 |
|
57 |
| - # 7. Copy umbrella dashboard index |
58 |
| - - name: Copy Dashboard |
| 44 | + # 5. Build the site using the umbrella playbook |
| 45 | + - name: Build site |
59 | 46 | run: |
|
60 |
| - mkdir -p build/site |
61 |
| - cp index.html build/site/index.html |
| 47 | + npx antora antora-playbook.yml --to-dir=build/site |
62 | 48 |
|
63 |
| - # 8. Deploy combined site to GitHub Pages |
| 49 | + # 6. Deploy to GitHub Pages |
64 | 50 | - name: Deploy to GitHub Pages
|
65 |
| - uses: peaceiris/actions-gh-pages@v3 |
| 51 | + uses: JamesIves/github-pages-deploy-action@v4 |
66 | 52 | with:
|
67 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
68 |
| - publish_dir: build/site |
69 |
| - publish_branch: gh-pages |
| 53 | + folder: build/site |
| 54 | + branch: gh-pages |
0 commit comments