Skip to content

Commit

Permalink
deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
onx2 committed Jan 16, 2024
1 parent d5940e5 commit 1817c91
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 5 deletions.
12 changes: 12 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
git checkout main
# create a local temp branch containing the splitted output folder
git subtree split --prefix dist -b temp

git checkout temp
git add .
git commit -m "deploying"

# force the push of the gh-pages branch to the remote gh-pages branch at origin
git push -f origin gh-pages
# delete the local temp because you will need it: ref
git branch -D temp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

35 changes: 33 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,39 @@
href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet"
/>
<script type="module" crossorigin src="/assets/index-GnyFtlG_.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-pRfuAaQP.css">

<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
// Single Page Apps for GitHub Pages
// MIT License
// https://github.com/rafgraph/spa-github-pages
// This script checks to see if a redirect is present in the query string,
// converts it back into the correct url and adds it to the
// browser's history using window.history.replaceState(...),
// which won't cause the browser to attempt to load the new url.
// When the single page app is loaded further down in this file,
// the correct url will be waiting in the browser's history for
// the single page app to route accordingly.
(function (l) {
if (l.search[1] === "/") {
var decoded = l.search
.slice(1)
.split("&")
.map(function (s) {
return s.replace(/~and~/g, "&");
})
.join("?");
window.history.replaceState(
null,
null,
l.pathname.slice(0, -1) + decoded + l.hash,
);
}
})(window.location);
</script>
<!-- End Single Page Apps for GitHub Pages -->
<script type="module" crossorigin src="/assets/index-QuQPUaqG.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-I9BMxnCc.css">
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:fix": "npm run lint -- --fix",
"prettier": "npx prettier src test --check",
"prettier:fix": "npm run prettier -- --write",
"deploy": "npm run build && git subtree push --prefix dist origin gh-pages"
"deploy": "npm run build && chmod +x ./deploy.sh && ./deploy.sh"
},
"imports": {
"#*": [
Expand Down

0 comments on commit 1817c91

Please sign in to comment.