summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml30
-rw-r--r--templates/var/www/html/index.html2
-rw-r--r--templates/var/www/html/misc.js7
3 files changed, 30 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..236b28c
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,30 @@
+# source repo .gitlab-ci.yml
+# requires a project access token (Project > Settings > Access tokens):
+# - TOKEN with read_repository, write_repository; Role: Maintainer
+#
+# disable protected branch for Maintainer (Project > Settings > Repository):
+# - main branch allowed to merge, allowed to push and merge maintainer; allowed to force push on
+#
+# requires the following gitlab variables (Project > Settings > CI/CD > Variables):
+# - REPO_NAME: gitlab.com/<user>/<repo_name> (Protected, Masked, Expanded)
+# - SOURCE_REPO: https://cgit.example.com/<repo_name> (Protected, Masked, Expanded)
+# - TOKEN: <project access token> (Protected, Masked, Expanded)
+#
+stages:
+ - mirror
+
+mirror-from-cgit:
+ stage: mirror
+ image: ubuntu:20.04
+ before_script:
+ - apt-get update -y && apt-get install -y git
+ - git config --global user.name "CI"
+ - git config --global user.email "ci@gitlab.com"
+ script:
+ - git clone --mirror "$SOURCE_REPO" temp_repo
+ - cd temp_repo
+ - TARGET_REPO="https://oauth2:$TOKEN@$REPO_NAME"
+ - git remote set-url origin "$TARGET_REPO"
+ - git push --prune --mirror
+ only:
+ - schedules
diff --git a/templates/var/www/html/index.html b/templates/var/www/html/index.html
index d05e316..f8469e4 100644
--- a/templates/var/www/html/index.html
+++ b/templates/var/www/html/index.html
@@ -25,8 +25,6 @@
</audio>
</div>
</div>
-
- <script src="misc.js"></script>
<script src="audio-controls.js"></script>
<script src="video-background.js"></script>
</body>
diff --git a/templates/var/www/html/misc.js b/templates/var/www/html/misc.js
deleted file mode 100644
index 4532fba..0000000
--- a/templates/var/www/html/misc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-if (/iP(hone|od|ad)/.test(navigator.userAgent)) {
- const alertDiv = document.getElementById('alert');
- alertDiv.textContent = "iOS does not support browser OGG streaming";
- alertDiv.style.color = "#FF0000";
- alertDiv.style.fontWeight = "normal";
- alertDiv.style.display = "block";
-}