Skip to content

Commit

Permalink
add gh-pages dependency to deploy pages (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmaayan authored Dec 19, 2022
1 parent fd6251c commit 68fbcda
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 28 deletions.
17 changes: 3 additions & 14 deletions apps/nextjs-example/next.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
const isGithubActions = process.env.GITHUB_ACTIONS || false;

let assetPrefix = "";
let basePath = "";

if (isGithubActions) {
// trim off `<owner>/`
const repo = process.env.GITHUB_REPOSITORY.replace(/.*?\//, "");

assetPrefix = `/${repo}/`;
basePath = `/${repo}`;
}
const isProd = process.env.NODE_ENV === "production";

module.exports = {
reactStrictMode: true,
assetPrefix: assetPrefix,
basePath: basePath,
assetPrefix: isProd ? "/aptos-wallet-adapter" : "",
basePath: isProd ? "/aptos-wallet-adapter" : "",
images: { unoptimized: true },
experimental: {
transpilePackages: ["wallet-adapter-react", "wallet-adapter-plugin"],
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"clean": "turbo run clean && rm -rf node_modules",
"changeset": "changeset",
"version-packages": "changeset version",
"publish-packages": "changeset version && changeset publish"
"publish-packages": "changeset version && changeset publish",
"example:export": "pnpm run --filter {apps/nextjs-example} export",
"example:build": "pnpm run --filter {apps/nextjs-example} build",
"deploy:example": "pnpm run example:build && pnpm run example:export && touch ./apps/nextjs-example/out/.nojekyll && gh-pages --dist apps/nextjs-example/out --dotfiles"
},
"devDependencies": {
"@aptos-labs/eslint-config-adapter": "workspace:*",
Expand All @@ -27,6 +30,8 @@
"engines": {
"node": ">=14.0.0"
},
"dependencies": {},
"dependencies": {
"gh-pages": "^4.0.0"
},
"packageManager": "[email protected]"
}
130 changes: 118 additions & 12 deletions pnpm-lock.yaml

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

0 comments on commit 68fbcda

Please sign in to comment.