Skip to content

Commit

Permalink
feat: add back gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Feb 27, 2024
1 parent c31fdf5 commit badcb58
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Test
on: push
jobs:
Lint:
runs-on: ubuntu-latest
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: GitHub Pages

on:
workflow_run:
workflows: ["Test"]
types: [completed]
branches:
- "main"

jobs:
deploy:
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Build
run: |
npm i
npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
20 changes: 14 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
const useProxy = false;

const nextConfig = {
eslint: {
ignoreDuringBuilds: process.env.QUICK_BUILD === "true",
},
rewrites: async () => [
{
destination: "https://rpc.xion-testnet-1.burnt.com:443",
source: "/rpc",
},
],
typescript: {
ignoreBuildErrors: process.env.QUICK_BUILD === "true",
},
...(useProxy
? {
rewrites: async () => [
{
destination: "https://rpc.xion-testnet-1.burnt.com:443",
source: "/rpc",
},
],
}
: {
output: "export",
}),
};

export default nextConfig;
10 changes: 6 additions & 4 deletions src/features/staking/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export const { chainId } = testnetChainInfo;
export const dashboardUrl =
process.env.NODE_ENV === "production" ? undefined : "http://localhost:3000";

export const rpcEndpoint =
typeof window === "undefined"
? "https://rpc.xion-testnet-1.burnt.com:443"
: `${window.location.origin}/rpc`;
// export const rpcEndpoint =
// typeof window === "undefined"
// ? "https://rpc.xion-testnet-1.burnt.com:443"
// : `${window.location.origin}/rpc`;

export const rpcEndpoint = "https://rpc.xion-testnet-1.burnt.com:443";

0 comments on commit badcb58

Please sign in to comment.