summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2021-04-26 19:04:39 +0700
committerDaniil Baturin <daniil@baturin.org>2021-04-26 19:04:39 +0700
commitb7cb894245ce2822d37a7ac682507ad1291291c2 (patch)
tree9139cc5e9496e941b6a2a2f9787e43d01512c3a3
parentdd37492c048c0e6902b02067369b8e2e4a5a2118 (diff)
downloadcommunity.vyos.net-b7cb894245ce2822d37a7ac682507ad1291291c2.tar.gz
community.vyos.net-b7cb894245ce2822d37a7ac682507ad1291291c2.zip
Add a warning banner to the staging version.
-rw-r--r--.github/workflows/main.yml2
-rw-r--r--soupault.conf11
-rw-r--r--templates/staging-warning.html6
3 files changed, 15 insertions, 4 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8926b87..46656fa 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -50,7 +50,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SNAPSHOTS_BUCKET: ${{ secrets.SNAPSHOTS_BUCKET }}
- SOUPAULT_OPTS: "--profile live"
+ SOUPAULT_OPTS: "--profile " ${{ secrets.SOUPAULT_PROFILE }}"
run: |
make all
diff --git a/soupault.conf b/soupault.conf
index 4c1143a..46bb262 100644
--- a/soupault.conf
+++ b/soupault.conf
@@ -42,6 +42,14 @@
selector = "main"
action = "insert_before"
+# Inserts a scary warning banner in preview versions
+[widgets.insert-staging-warning]
+ widget = "include"
+ file = "template/staging-warning.html"
+ selector = "header"
+ action = "prepend_child"
+ profile = "staging"
+
# Generates a list of available snapshots from S3
[widgets.list-snapshots]
widget = "exec"
@@ -50,7 +58,6 @@
action = "append_child"
page = "get/snapshots.md"
- profile = "live"
## Nightly build image listing generator ##
@@ -80,7 +87,6 @@
page = "get/nightly-builds.md"
after = "insert-nightly-build-containers"
- profile = "live"
# Generates a list of the "equuleus" branch builds from S3
[widgets.list-nightly-builds-equuleus]
@@ -91,6 +97,5 @@
page = "get/nightly-builds.md"
after = "insert-nightly-build-containers"
- profile = "live"
diff --git a/templates/staging-warning.html b/templates/staging-warning.html
new file mode 100644
index 0000000..4a87932
--- /dev/null
+++ b/templates/staging-warning.html
@@ -0,0 +1,6 @@
+<div style="text-align:center; border: 2px solid red; margin-bottom: 10px; padding: 20px;">
+ <h1>WARNING! ACHTUNG! ATENCIÓN! УВАГА!</h1>
+ <p>This is a <strong>preview version</strong> of the VyOS community website. It may differ from the production version in the most unexpected ways:
+ contain links to untested VyOS images, contain misleading information, or simply be horribly broken.</p>
+ <p>Unless you are looking for a preview website version, please leave this page and go to the production version at <a href="https://vyos.net">https://vyos.net</a>!</p>
+</div>