Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redirect for radapp.dev #895

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/redirect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Radius Redirect

on:
workflow_dispatch:
push:
branches:
- edge
- v*.*
paths:
- 'redirect/**'
- '.github/workflows/redirect.yml'
pull_request:
branches:
- edge
- v*.*
paths:
- 'redirect/**'
- '.github/workflows/redirect.yml'

jobs:
deploy-website:
name: Deploy Redirect Website
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: false
- name: Deploy staging site
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.SWA_REDIRECT_TOKEN }}
action: "upload"
app_location: "redirect/src"
skip_api_build: true
skip_app_build: true

close_pr_site:
name: Close PR Staging Site
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.SWA_REDIRECT_TOKEN }}
action: "close"
3 changes: 3 additions & 0 deletions redirect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Redirect Page

Our current domain, `radapp.io`, is the homepage for Radius. We previously operated on `radapp.dev` and may still have some remaining links to that domain. This directory contains a redirect page that we host on `radapp.dev` to redirect to `radapp.io`.
10 changes: 10 additions & 0 deletions redirect/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to https://radapp.io</title>
<meta http-equiv="refresh" content="0; URL=https://radapp.io">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and this uses an HTTP 301 which is correct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this handle both radapp.dev and docs.radapp.dev?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope that'll need to be tackled by a different mechanism that retains the path in the URL. Probably a web.config file that updates the app service configuration. Can do that as a follow-up to this PR

</head>
<body>
<p>Please wait while you are redirected to https://radapp.io</p>
</body>
</html>
Loading