Skip to content

Commit 9b07605

Browse files
committed
removed index changes from test file, edit assets command before checkout and edit genrate index html
1 parent 7b4cea6 commit 9b07605

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/deploy-main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,19 @@ jobs:
5656
NODE_ENV: development
5757
VITE_TEST_SERVER_AUTH: "admin:opencast"
5858

59-
6059
- name: Prepare git
6160
run: |
6261
git config --global user.name "Release Bot"
6362
git config --global user.email "cloud@opencast.org"
6463
64+
- name: update CSS and other assets
65+
if: github.ref == 'refs/heads/develop'
66+
run: |
67+
rm -rf assets
68+
mv assets_temp assets
69+
git add assets
70+
git diff --staged --quiet || git commit --amend -m "Build $(date)"
71+
6572
- name: Commit new version
6673
run: |
6774
git fetch --unshallow origin gh-pages
@@ -70,7 +77,7 @@ jobs:
7077
rm -rf $BRANCH
7178
mv build $BRANCH
7279
#Generate an index, in case anyone lands at the root of the test domain
73-
echo '<html><head><link rel=stylesheet type=text/css href=.github/assets/index.css /></head><body><div class="head-container"><img src=https://admin-interface.opencast.org/develop/assets/opencast-white-B3KJ3o-a.svg /></div><div class="navbar-container"></div><div class="text-container"><p>Deployment for the latest development versions of the Opencast admininterface.The branches listed here correspond to Opencast's own branches.</br><b>Please select a version.</b></p></div><ul>' > index.html
80+
echo '<html><head><link rel=stylesheet type=text/css href=assets/index.css /></head><body><div class="head-container"><img src=assets/opencast-white.svg /></div><div class="navbar-container"></div><div class="text-container"><p>Deployment for the latest development versions of the Opencast admin interface.The branches listed here correspond to Opencast\'s own branches.</br><b>Please select a version.</b></p></div><ul>' > index.html
7481
find . -mindepth 1 -maxdepth 1 -type d \
7582
| grep '[0-9]*.x\|develop' \
7683
| sort -r \
@@ -81,9 +88,6 @@ jobs:
8188
env:
8289
BRANCH: ${{needs.detect.outputs.branch}}
8390

84-
- name: update CSS and other assets
85-
if: github.ref == 'refs/heads/develop'
86-
run: cp -r .github/assets admin-interface-test/
8791

8892
- name: Push updates
8993
run: git push origin gh-pages --force

.github/workflows/deploy-test.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,12 @@ jobs:
111111
- name: generate index.html
112112
working-directory: admin-interface-test
113113
run: |
114-
echo '<html><head><link rel=stylesheet type=text/css href=.github/assets/index.css /></head><body><div class="head-container"><img src=https://admin-interface.opencast.org/develop/assets/opencast-white-B3KJ3o-a.svg /></div><div class="navbar-container"></div><div class="text-container"><p>Test deployment for the latest development versions of the Opencast admininterface.The branches listed here correspond to Opencast's own branches.</br><b>Please select a version.</b></p></div><ul>' > index.html
114+
echo '<html><body><ul>' > index.html
115115
find . -maxdepth 2 -name '*_*' -type d \
116116
| sort -r \
117117
| sed 's/^\(.*\)$/<li><a href=\1>\1<\/a><\/li>/' >> index.html
118118
echo '</ul></body></html>' >> index.html
119119
120-
- name: update CSS and other assets
121-
if: github.ref == 'refs/heads/develop'
122-
run: cp -r .github/assets admin-interface-test/
123-
124120
- name: commit new version
125121
working-directory: admin-interface-test
126122
run: |

0 commit comments

Comments
 (0)