Skip to content

Commit e2b5be7

Browse files
committed
Merge branch 'main' into pr/477
2 parents 8f4b96c + 83ede95 commit e2b5be7

File tree

4,990 files changed

+76720
-73823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,990 files changed

+76720
-73823
lines changed

.github/workflows/azure-static-web-apps-happy-dune-071cbee03.yml

+47-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Zip artifact for deployment
3131
run: Compress-Archive -Path _site/* -DestinationPath .\_site.zip
3232
- name: Publish results
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: release
3636
path: _site.zip
@@ -41,7 +41,7 @@ jobs:
4141
needs: build_job
4242
name: Deploy Job
4343
steps:
44-
- uses: actions/download-artifact@v3
44+
- uses: actions/download-artifact@v4
4545
with:
4646
name: release
4747
path: .
@@ -61,3 +61,48 @@ jobs:
6161
api_location: "" # Api source code path - optional
6262
output_location: "" # Built app content directory - optional
6363
###### End of Repository/Build Configurations ######
64+
65+
deploy_job_Storage_Account:
66+
if: (github.event_name == 'push' && github.repository == 'SkylineCommunications/dataminer-docs-connectors')
67+
runs-on: ubuntu-latest
68+
needs: build_job
69+
name: Deploy Job to Storage account
70+
steps:
71+
- uses: actions/download-artifact@v4
72+
with:
73+
name: release
74+
path: .
75+
- name: Unzip artifact for deployment
76+
run: Expand-Archive -Path _site.zip -DestinationPath ./_site
77+
shell: pwsh
78+
- name: Delete files that should not be indexed by Azure Search Service
79+
run: |
80+
rm -f ./_site/404.html
81+
rm -f ./_site/README.html
82+
find ./_site -name 'toc.html' -type f -delete
83+
- name: Upload the new files
84+
uses: bacongobbler/azure-blob-storage-upload@main
85+
with:
86+
source_dir: _site
87+
container_name: docs-connectors
88+
connection_string: ${{ secrets.AZURE_STORAGE_ACCOUNT_DOCS_CONNECTION_STRING }}
89+
# Sync: true keeps the source and destination in sync,
90+
# otherwise changed files and new would be pushed, but deleted wouldn't be removed.
91+
sync: 'true'
92+
93+
reindex_azure_search:
94+
runs-on: ubuntu-latest
95+
needs: deploy_job_Storage_Account
96+
name: Re-index azure search
97+
steps:
98+
- name: Azure Cognitive Search Reindex
99+
# You may pin to the exact commit or the version.
100+
# uses: andrewconnell/azure-search-index@ac64a40924771a415e01d52db4c1d557ecd3a99f
101+
uses: andrewconnell/azure-search-index@2.0.3
102+
with:
103+
# Name of the Azure Cognitive Search resource.
104+
azure-search-instance: docs-srch
105+
# Search indexer to reindex
106+
azure-search-indexer: azureblob-indexer-docs-connectors
107+
# Admin key used to connect to Azure Cognitive Search instance
108+
azure-search-admin-key: ${{ secrets.AZURE_SEARCH_KEY }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Upload Modified Files to Azure Blob Storage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
upload_to_azure_after_master_commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Fetch files from last merge
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Get all changed markdown files
18+
id: changed-markdown-files
19+
uses: tj-actions/changed-files@v41
20+
with:
21+
files: |
22+
connector/doc/**.md
23+
include_all_old_new_renamed_files: true
24+
25+
- name: Get all changed images
26+
id: changed-images
27+
uses: tj-actions/changed-files@v41
28+
with:
29+
files: |
30+
connector/images/**
31+
32+
- name: Summary changed markdown files
33+
run: |
34+
echo Docs:
35+
echo Number of markdown files added: ${{ steps.changed-markdown-files.outputs.added_files_count }}
36+
echo Number of markdown files modified: ${{ steps.changed-markdown-files.outputs.modified_files_count }}
37+
echo Number of markdown files renamed: ${{ steps.changed-markdown-files.outputs.renamed_files_count }}
38+
echo Number of markdown files deleted: ${{ steps.changed-markdown-files.outputs.deleted_files_count }}
39+
echo Images:
40+
echo Number of images added: ${{ steps.changed-images.outputs.added_files_count }}
41+
echo Number of images modified: ${{ steps.changed-images.outputs.modified_files_count }}
42+
echo Number of images renamed: ${{ steps.changed-images.outputs.renamed_files_count }}
43+
echo Number of images deleted: ${{ steps.changed-images.outputs.deleted_files_count }}
44+
45+
- name: Create folder for added, modified and renamed files
46+
if: steps.changed-markdown-files.outputs.all_changed_and_modified_files_count > 0 || steps.changed-images.outputs.all_changed_and_modified_files_count > 0
47+
run: |
48+
mkdir update_docs
49+
mkdir update_images
50+
51+
- name: Add added and modified docs to folders
52+
if: steps.changed-markdown-files.outputs.added_files_count > 0 || steps.changed-markdown-files.outputs.modified_files_count > 0
53+
id: list-docs
54+
run: |
55+
for file in ${{ steps.changed-markdown-files.outputs.added_files }}; do
56+
echo "$file was added"
57+
cp $file update_docs/
58+
done
59+
for file in ${{ steps.changed-markdown-files.outputs.modified_files }}; do
60+
echo "$file was modified"
61+
cp $file update_docs/
62+
done
63+
64+
- name: Add added and modified images to folders
65+
if: steps.changed-images.outputs.added_files_count > 0 || steps.changed-images.outputs.modified_files_count > 0
66+
id: list-images
67+
run: |
68+
for image in ${{ steps.changed-images.outputs.added_files }}; do
69+
echo "$image was added"
70+
cp $image update_images/
71+
done
72+
for image in ${{ steps.changed-images.outputs.modified_files }}; do
73+
echo "$image was modified"
74+
cp $image update_images/
75+
done
76+
77+
- name: Delete renamed files on azure and add new name to folders
78+
if: steps.changed-markdown-files.outputs.all_old_new_renamed_files_count > 0
79+
uses: azure/CLI@v1
80+
with:
81+
inlineScript: |
82+
for file in ${{ steps.changed-markdown-files.outputs.all_old_new_renamed_files }}; do
83+
IFS=',' read -r original renamed <<< "$file"
84+
if [[ -n $renamed ]]; then
85+
echo "$original was renamed to $renamed"
86+
if [[ $original == *doc* ]]; then
87+
stripped_file="$(basename "$original")"
88+
cp $renamed update_docs/
89+
az storage blob delete -c 'docs' -n $stripped_file --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}'
90+
fi
91+
if [[ $original == *images* ]] ; then
92+
stripped_image="$(basename "$original")"
93+
cp $renamed update_images/
94+
az storage blob delete -c 'images' -n $stripped_image --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}'
95+
fi
96+
fi
97+
done
98+
99+
- name: Delete removed files on azure
100+
if: steps.changed-markdown-files.outputs.any_deleted == 'true' || steps.changed-images.outputs.any_deleted == 'true'
101+
uses: azure/CLI@v1
102+
with:
103+
inlineScript: |
104+
for file in ${{ steps.changed-markdown-files.outputs.deleted_files }}; do
105+
stripped_file="$(basename "$file")"
106+
az storage blob delete -c 'docs' -n $stripped_file --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}'
107+
echo "$file was deleted"
108+
done
109+
for image in ${{ steps.changed-images.outputs.deleted_files }}; do
110+
stripped_image="$(basename "$image")"
111+
az storage blob delete -c 'images' -n $stripped_image --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}'
112+
echo "$image was deleted"
113+
done
114+
115+
- name: Upload docs folder contents to Azure Storage Container
116+
if: steps.changed-markdown-files.outputs.any_changed == 'true'
117+
uses: azure/CLI@v1
118+
with:
119+
inlineScript: |
120+
for file in update_docs/*; do
121+
blob_name="$(basename "$file")"
122+
sed -E 's|xref:Connector_help_([^)]*)\)|https://docs.dataminer.services/connector/doc/\1.html)|g' $file
123+
sed -i 's~\~/connector/images/~https://api.dataminer.services/api/public-catalog/v1-0/catalog/images/~g' $file
124+
az storage blob upload --file "$file" -c 'docs' -n "$blob_name" --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}' --overwrite 'true'
125+
az storage blob update -c 'docs' -n "$blob_name" --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}' --content-type 'text/plain'
126+
echo $blob_name uploaded
127+
done
128+
129+
130+
- name: Upload images folder contents to Azure Storage Container
131+
if: steps.changed-images.outputs.any_changed == 'true'
132+
uses: azure/CLI@v1
133+
with:
134+
inlineScript: |
135+
for image in update_images/*; do
136+
blob_name="$(basename "$image")"
137+
az storage blob upload --file "$image" -c 'images' -n "$blob_name" --connection-string '${{ secrets.AZUREBLOBSTORAGECS }}' --overwrite 'true'
138+
echo $blob_name uploaded
139+
done
140+

404.html

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
<!DOCTYPE html>
2+
<!--[if IE]><![endif]-->
3+
<html>
4+
5+
<head>
6+
<meta charset="utf-8">
7+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
8+
<title>docs.dataminer.services | Error 404</title>
9+
<meta name="viewport" content="width=device-width">
10+
<meta name="title" content="docs.dataminer.services | Error 404">
11+
<link rel="shortcut icon" href="favicon.ico">
12+
</head>
13+
14+
<body>
15+
<div class="container py-5 row">
16+
<div class="wp-block-column">
17+
<center>
18+
<h1 class="pageNotFound">404</h1>
19+
<p class="lead">Looks like this page went missing.</p>
20+
<p>Maybe you'll find what you're looking for via our <a href="https://docs.dataminer.services/connector/index.html">home page</a>.</p>
21+
</center>
22+
</div>
23+
<div class="wp-block-column">
24+
<div class="wp-block-drupalmedia-drupal-media-entity">
25+
<div class="contextual-region">
26+
<img alt="Something went wrong, page not found" class="inline-image"
27+
src="https://www.skyline.be/sites/default/files/inline-images/404_0.png">
28+
</div>
29+
</div>
30+
</div>
31+
</div>
32+
</body>
33+
<style>
34+
body {
35+
margin: 0;
36+
font-family: Segoe UI, SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif;
37+
font-size: 1rem;
38+
font-weight: 400;
39+
line-height: 1.5;
40+
color: #212529;
41+
text-align: left;
42+
}
43+
44+
.container {
45+
margin: 50px auto auto auto;
46+
padding: 0 20px;
47+
width: 100%;
48+
max-width: 1340px;
49+
flex-direction: row
50+
}
51+
52+
.row {
53+
display: flex;
54+
flex-direction: row;
55+
flex-wrap: wrap;
56+
width: 100%;
57+
}
58+
59+
.py-5 {
60+
padding-bottom: 3rem !important;
61+
}
62+
63+
.contextual-region {
64+
position: relative;
65+
}
66+
67+
.contextual {
68+
position: absolute;
69+
z-index: 500;
70+
top: 6px;
71+
right: 0;
72+
}
73+
74+
.wp-block-column {
75+
flex-grow: 1;
76+
min-width: 0;
77+
word-break: break-word;
78+
overflow-wrap: break-word;
79+
flex-direction: column;
80+
flex-basis: 100%;
81+
flex: 1;
82+
}
83+
84+
.pageNotFound {
85+
font-size: 3.5rem;
86+
line-height: 1.1;
87+
margin-bottom: 1rem;
88+
color: #00aeef;
89+
font-weight: 900;
90+
}
91+
92+
.lead {
93+
color: #6c757d;
94+
font-weight: 400;
95+
font-size: 1.5rem;
96+
}
97+
98+
p {
99+
margin-top: 0;
100+
margin-bottom: 1rem;
101+
}
102+
103+
.btn {
104+
white-space: normal;
105+
display: inline-block;
106+
font-weight: 400;
107+
color: #212529;
108+
text-align: center;
109+
vertical-align: middle;
110+
cursor: pointer;
111+
user-select: none;
112+
background-color: transparent;
113+
border: 1px solid transparent;
114+
padding: 0.375rem 0.95rem;
115+
font-size: 1rem;
116+
line-height: 1.5;
117+
border-radius: 0.25rem;
118+
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
119+
}
120+
121+
.btn-lg,
122+
.btn-group-lg>.btn {
123+
font-weight: bold;
124+
}
125+
126+
.btn-lg,
127+
.btn-group-lg>.btn {
128+
padding: 0.5rem 1rem;
129+
font-size: 1.25rem;
130+
line-height: 1.5;
131+
border-radius: 0.3rem;
132+
}
133+
134+
.btn-secondary {
135+
color: #fff;
136+
background-color: #00aeef;
137+
border-color: #00aeef;
138+
text-decoration: none;
139+
}
140+
141+
.inline-image {
142+
width: 100%;
143+
height: auto;
144+
max-width: 1038;
145+
max-height: 711;
146+
}
147+
148+
img {
149+
vertical-align: middle;
150+
border-style: none;
151+
max-width: 1038px;
152+
max-height: 711px;
153+
}
154+
</style>
155+
156+
</html>

0 commit comments

Comments
 (0)