-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e37a5aa
commit e746821
Showing
7 changed files
with
5,262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # Trigger deployment when pushing to the main branch | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build the project | ||
run: npm run build # This will run tsc and generate dist folder | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist # The folder that contains the built files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
node_modules | ||
.env | ||
/dist | ||
dist | ||
|
||
# Hardhat files | ||
/cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Config Viewer</title> | ||
<script src="dist/index.js"></script> <!-- Refer to the compiled JS --> | ||
</head> | ||
|
||
<body> | ||
<script> | ||
// Get chainId from the URL | ||
const urlParams = new URLSearchParams(window.location.search); | ||
const chainId = parseInt(urlParams.get('chainId') || ''); | ||
|
||
if (isNaN(chainId)) { | ||
document.getElementById('configOutput').textContent = 'Invalid or missing chainId in URL'; | ||
} else { | ||
// Call loadConfig function (which is async) | ||
loadConfig(chainId).then(config => { | ||
document.getElementById('configOutput').textContent = JSON.stringify(config, null, 2); | ||
}).catch(error => { | ||
document.getElementById('configOutput').textContent = `Error: ${error.message}`; | ||
}); | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.