Skip to content

Commit 7bb7383

Browse files
author
Sandeep Rudra
committed
workflow update
1 parent 144451c commit 7bb7383

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,54 @@
1-
contents: write
1+
name: Deploy Combined Docs
22

3+
# Define the events that trigger this workflow
4+
on:
5+
# Run on push to the main branch
6+
push:
7+
branches:
8+
- main
9+
# Allow manual triggering from the GitHub UI
10+
workflow_dispatch:
11+
12+
# Set permissions needed for deployment
13+
permissions:
14+
contents: write
15+
16+
# Define the jobs to run
317
jobs:
418
deploy:
519
runs-on: ubuntu-latest
620
steps:
7-
- uses: actions/checkout@v3
21+
# Check out the repository code
22+
- name: Checkout code
23+
uses: actions/checkout@v3
824
with:
925
fetch-depth: 0
1026

11-
- name: Create site directory and clear cache
27+
# Create the site directory
28+
- name: Create site directory
1229
run: |
1330
mkdir -p build/site
1431
rm -rf aas-specifications idta-submodel-templates
1532
16-
- name: Copy existing index.html
33+
# Copy and modify the index.html file
34+
- name: Copy and update index.html
1735
run: |
1836
cp index.html build/site/index.html
1937
sed -i 's|<h1>IDTA AAS Specification Documentation</h1>|<h1>Industrial Digital Twin Documentation</h1>|g' build/site/index.html
2038
sed -i 's|<h2 style="color:red;">THIS IS A TEST - SHOULD BE VISIBLE</h2>|<h2 style="color:red;">THIS IS A TEST - UPDATED VERSION - DEPLOYED AT '"$(date)"'</h2>|g' build/site/index.html
2139
sed -i 's|href="/aas-specifications/|href="./aas-specifications/|g' build/site/index.html
2240
sed -i 's|href="/idta-submodel-templates/|href="./idta-submodel-templates/|g' build/site/index.html
41+
echo "Updated index.html content:"
2342
cat build/site/index.html
2443
25-
- name: Copy other required files
44+
# Create necessary files for GitHub Pages
45+
- name: Create GitHub Pages files
2646
run: |
2747
touch build/site/.nojekyll
2848
echo "industrialdigitaltwin.io" > build/site/CNAME
2949
ls -la build/site/
3050
51+
# Download AAS Specifications
3152
- name: Download AAS Specifications site
3253
run: |
3354
mkdir -p build/site/aas-specifications
@@ -36,6 +57,7 @@ jobs:
3657
echo "Contents of aas-specifications directory:"
3758
ls -la aas-specifications/ || echo "No files found"
3859
60+
# Download Submodel Templates
3961
- name: Download Submodel Templates site
4062
run: |
4163
mkdir -p build/site/idta-submodel-templates
@@ -44,6 +66,7 @@ jobs:
4466
echo "Contents of idta-submodel-templates directory:"
4567
ls -la idta-submodel-templates/ || echo "No files found"
4668
69+
# List all deployed files for debugging
4770
- name: List deployed files
4871
run: |
4972
echo "Contents of build/site root:"
@@ -53,6 +76,7 @@ jobs:
5376
echo "Contents of idta-submodel-templates directory:"
5477
ls -la build/site/idta-submodel-templates/ || echo "Directory empty or not found"
5578
79+
# Deploy to GitHub Pages
5680
- name: Deploy to GitHub Pages
5781
uses: JamesIves/github-pages-deploy-action@v4
5882
with:

0 commit comments

Comments
 (0)