Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2023-10-21 12:44:37 +02:00
commit 34dfb1e43f
3 changed files with 43 additions and 1 deletions

View File

@ -93,6 +93,18 @@ jobs:
lua luadocumentor.lua -d ${{ github.workspace }}/build/doc "${{ github.workspace }}/Moose Development/Moose" lua luadocumentor.lua -d ${{ github.workspace }}/build/doc "${{ github.workspace }}/Moose Development/Moose"
working-directory: ${{ github.workspace }}/build/tools/luadocumentor working-directory: ${{ github.workspace }}/build/tools/luadocumentor
#########################################################################
# Replace <head> tag
#########################################################################
- name: Replace head tag
run: |
python3 "${{ github.workspace }}/Moose Development/docs-header.py"
working-directory: ${{ github.workspace }}/build/doc
- name: Check replacement of head tag
run: |
head -10 ${{ github.workspace }}/build/doc/AI.AI_A2A_Cap.html
######################################################################### #########################################################################
# Push to MOOSE_DOCS # Push to MOOSE_DOCS
######################################################################### #########################################################################
@ -124,7 +136,7 @@ jobs:
- name: Copy build result to MOOSE_DOCS - name: Copy build result to MOOSE_DOCS
run: | run: |
cp ./build/doc/*.html ./build/MOOSE_DOCS/Documentation/ cp ./build/doc/*.* ./build/MOOSE_DOCS/Documentation/
- name: Push result to docs repository - name: Push result to docs repository
if: ${{ vars.FORCE_PUSH == 'true' }} if: ${{ vars.FORCE_PUSH == 'true' }}

View File

@ -0,0 +1,4 @@
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-97385487-1"></script>
<script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-97385487-1');</script>

View File

@ -0,0 +1,26 @@
# import required module
from pathlib import Path
import os
# assign directory
directory = '.'
print( "Replacing head tag in all html files" )
# Read template file
with open( os.path.dirname(__file__) + '/docs-header.html', 'r') as file:
newhead = file.read()
# iterate over files in
# that directory
files = Path(directory).glob('*.html')
for file in files:
# print(file)
with open(file, 'r') as fileread:
filedata = fileread.read()
# Replace the target string
filedata = filedata.replace( '<head>', newhead )
# Write the file out again
with open(file, 'w') as filewrite:
filewrite.write(filedata)