Skip to content

Commit 5d272b1

Browse files
committed
Update github.io docs to simply redirect to mindersec.dev
1 parent 4307e88 commit 5d272b1

File tree

4 files changed

+49
-44
lines changed

4 files changed

+49
-44
lines changed

.github/workflows/publish.yaml

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,31 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: Publish
42

53
on:
64
push:
75
branches: ["main"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
10-
# We want to hook up the mindersec/minder repo to trigger this action
11-
# on pushes to the main branch under docs.
126
workflow_dispatch:
137

14-
# Run once a day until further automation is wired up.
15-
schedule:
16-
- cron: "15 0 * * *"
17-
188
jobs:
19-
build:
9+
deploy:
2010
name: Deploy to GitHub Pages
2111
runs-on: ubuntu-latest
2212

2313
permissions:
2414
contents: read
15+
id-token: write
16+
pages: write
2517

26-
defaults:
27-
run:
28-
working-directory: ./docs
29-
steps:
30-
- name: Checkout docs
31-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
32-
with:
33-
repository: mindersec/minder
34-
35-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
36-
37-
with:
38-
node-version: 24
39-
40-
- name: Install dependencies
41-
run: npm ci
18+
environment: github-pages
4219

43-
- name: Build website
44-
run: npm run build
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6
4523

46-
- name: Deploy to GitHub Pages
24+
- name: Upload pages artifact
4725
uses: actions/upload-pages-artifact@v3
4826
with:
49-
path: ./docs/build
50-
deploy:
51-
name: Deploy
52-
runs-on: ubuntu-latest
53-
needs: build
27+
path: .
5428

55-
permissions:
56-
id-token: write
57-
pages: write
58-
59-
steps:
6029
- name: Deploy to GitHub Pages
30+
id: deploy
6131
uses: actions/deploy-pages@v4

404.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Redirecting…</title>
6+
<script>
7+
// Redirect all paths to the equivalent URL on docs.mindersec.dev.
8+
// GitHub Pages serves this 404.html for any path that has no matching file,
9+
// so window.location reflects the originally requested URL.
10+
var destination = 'https://docs.mindersec.dev'
11+
+ window.location.pathname
12+
+ window.location.search
13+
+ window.location.hash;
14+
window.location.replace(destination);
15+
</script>
16+
</head>
17+
<body>
18+
<p>Redirecting to <a href="https://docs.mindersec.dev/">docs.mindersec.dev</a></p>
19+
</body>
20+
</html>

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Website for Minder
22

3-
This site publishes the content from
4-
https://github.com/mindersec/minder/tree/main/docs to GitHub Pages. You probably
5-
want to make your changes there, unless you're looking to change the publishing
6-
process.
3+
Minder documentation was published for about 6 months using the default GitHub
4+
Pages URL. It is now published at the vanity domain
5+
https://docs.mindersec.dev/ directly from the sources at
6+
https://github.com/mindersec/minder/tree/main/docs. These pages now simply
7+
implement redirects to the correct site using a custom 404 page which
8+
implements a JavaScript redirect.

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Redirecting…</title>
6+
<link rel="canonical" href="https://docs.mindersec.dev/">
7+
<meta http-equiv="refresh" content="0; url=https://docs.mindersec.dev/">
8+
<script>window.location.replace('https://docs.mindersec.dev/' + window.location.search + window.location.hash);</script>
9+
</head>
10+
<body>
11+
<p>Redirecting to <a href="https://docs.mindersec.dev/">docs.mindersec.dev</a></p>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)