-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (73 loc) · 3.76 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitHub Deployment Links Generator</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 20px;
line-height: 1.6;
}
input, button, textarea {
width: 100%;
margin-top: 10px;
padding: 10px;
font-size: 16px;
}
button {
background-color: #007BFF;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
textarea {
height: 300px;
}
</style>
</head>
<body>
<h1>GitHub Deployment Links Generator</h1>
<p>Paste your GitHub repository URL below, and the deployment links will be customized for your repository.</p>
<input type="text" id="githubUrl" placeholder="Enter your GitHub repository URL">
<button onclick="generateLinks()">Generate Links</button>
<textarea id="output" readonly placeholder="Your customized links will appear here"></textarea>
<button onclick="copyToClipboard()">Copy to Clipboard</button>
<script>
function generateLinks() {
const githubUrl = document.getElementById("githubUrl").value.trim();
if (!githubUrl.startsWith("https://github.com/")) {
alert("Please enter a valid GitHub repository URL.");
return;
}
const repo = githubUrl.replace("https://github.com/", "");
const links = `
[![Deploy to Heroku](https://binbashbanana.github.io/deploy-buttons/buttons/remade/heroku.svg)](https://heroku.com/deploy/?template=https://github.com/${repo})
[![Run on Replit](https://binbashbanana.github.io/deploy-buttons/buttons/remade/replit.svg)](https://replit.com/github/${repo})
[![Remix on Glitch](https://binbashbanana.github.io/deploy-buttons/buttons/remade/glitch.svg)](https://glitch.com/edit/#!/import/github/${repo})
[![Deploy to Amplify Console](https://binbashbanana.github.io/deploy-buttons/buttons/remade/amplifyconsole.svg)](https://console.aws.amazon.com/amplify/home#/deploy?repo=https://github.com/${repo})
[![Run on Google Cloud](https://binbashbanana.github.io/deploy-buttons/buttons/remade/googlecloud.svg)](https://deploy.cloud.run/?git_repo=https://github.com/${repo})
[![Deploy to Oracle Cloud](https://binbashbanana.github.io/deploy-buttons/buttons/remade/oraclecloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/${repo}/archive/refs/heads/main.zip)
[![Deploy on Railway](https://binbashbanana.github.io/deploy-buttons/buttons/remade/railway.svg)](https://railway.app/new/template?template=https://github.com/${repo})
[![Deploy to Vercel](https://binbashbanana.github.io/deploy-buttons/buttons/remade/vercel.svg)](https://vercel.com/new/clone?repository-url=https://github.com/${repo})
[![Deploy to Netlify](https://binbashbanana.github.io/deploy-buttons/buttons/remade/netlify.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/${repo})
[![Deploy to Koyeb](https://binbashbanana.github.io/deploy-buttons/buttons/remade/koyeb.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/${repo}&branch=Main&name=${repo.split('/').pop()})
[![Deploy to Render](https://binbashbanana.github.io/deploy-buttons/buttons/remade/render.svg)](https://render.com/deploy?repo=https://github.com/${repo})
[![Deploy to Cyclic](https://binbashbanana.github.io/deploy-buttons/buttons/remade/cyclic.svg)](https://app.cyclic.sh/api/app/deploy/${repo})
`;
document.getElementById("output").value = links.trim();
}
function copyToClipboard() {
const output = document.getElementById("output");
output.select();
document.execCommand("copy");
alert("Links copied to clipboard!");
}
</script>
</body>
</html>