Skip to content

Commit 63916e8

Browse files
committed
add github pages deploy scripts
1 parent 936e3e0 commit 63916e8

File tree

4 files changed

+85
-3
lines changed

4 files changed

+85
-3
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,7 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
9797
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
9898
9999
<!-- AUTO-GENERATED-CONTENT:END -->
100+
101+
# Deploy to GitHub Pages
102+
103+
https://dev.to/flexdinesh/deploy-gatsby-sites-to-github-pages-eed

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"gatsby-plugin-sharp": "^5.11.0",
1212
"gatsby-source-filesystem": "^5.11.0",
1313
"gatsby-transformer-sharp": "^5.11.0",
14+
"gh-pages": "^6.0.0",
1415
"react": "^18.2.0",
1516
"react-dom": "^18.2.0"
1617
},
@@ -28,7 +29,8 @@
2829
"start": "gatsby develop",
2930
"serve": "gatsby serve",
3031
"clean": "gatsby clean",
31-
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
32+
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1",
33+
"deploy:github": "npm run build && node ./scripts/deploy-github"
3234
},
3335
"repository": {
3436
"type": "git",

scripts/deploy-github.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const ghpages = require('gh-pages')
2+
3+
// replace with your repo url
4+
ghpages.publish(
5+
'public',
6+
{
7+
branch: 'main',
8+
repo: 'https://github.com/covidgraph/website',
9+
},
10+
() => {
11+
console.log('Deploy Complete!')
12+
}
13+
)

yarn.lock

+65-2
Original file line numberDiff line numberDiff line change
@@ -2694,11 +2694,23 @@ array-includes@^3.1.6:
26942694
get-intrinsic "^1.1.3"
26952695
is-string "^1.0.7"
26962696

2697+
array-union@^1.0.1:
2698+
version "1.0.2"
2699+
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
2700+
integrity sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==
2701+
dependencies:
2702+
array-uniq "^1.0.1"
2703+
26972704
array-union@^2.1.0:
26982705
version "2.1.0"
26992706
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
27002707
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
27012708

2709+
array-uniq@^1.0.1:
2710+
version "1.0.3"
2711+
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
2712+
integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==
2713+
27022714
array.prototype.findlastindex@^1.2.2:
27032715
version "1.2.2"
27042716
resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz#bc229aef98f6bd0533a2bc61ff95209875526c9b"
@@ -3462,6 +3474,11 @@ command-exists@^1.2.4:
34623474
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69"
34633475
integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==
34643476

3477+
commander@^11.0.0:
3478+
version "11.0.0"
3479+
resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67"
3480+
integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==
3481+
34653482
commander@^2.20.0:
34663483
version "2.20.3"
34673484
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
@@ -4094,6 +4111,11 @@ electron-to-chromium@^1.4.477:
40944111
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.494.tgz#588f7a3d19d32a31f3a7e05d81b61d95d25b1555"
40954112
integrity sha512-KF7wtsFFDu4ws1ZsSOt4pdmO1yWVNWCFtijVYZPUeW4SV7/hy/AESjLn/+qIWgq7mHscNOKAwN5AIM1+YAy+Ww==
40964113

4114+
email-addresses@^5.0.0:
4115+
version "5.0.0"
4116+
resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-5.0.0.tgz#7ae9e7f58eef7d5e3e2c2c2d3ea49b78dc854fa6"
4117+
integrity sha512-4OIPYlA6JXqtVn8zpHpGiI7vE6EQOAg16aGnDMIAlZVinnoZ8208tW1hAbjWydgN/4PLTT9q+O1K6AH/vALJGw==
4118+
40974119
emoji-regex@^8.0.0:
40984120
version "8.0.0"
40994121
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
@@ -5548,6 +5570,19 @@ get-symbol-description@^1.0.0:
55485570
call-bind "^1.0.2"
55495571
get-intrinsic "^1.1.1"
55505572

5573+
gh-pages@^6.0.0:
5574+
version "6.0.0"
5575+
resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-6.0.0.tgz#3bb46ea13dc7cee306662db0d3f02bf05635cdc1"
5576+
integrity sha512-FXZWJRsvP/fK2HJGY+Di6FRNHvqFF6gOIELaopDjXXgjeOYSNURcuYwEO/6bwuq6koP5Lnkvnr5GViXzuOB89g==
5577+
dependencies:
5578+
async "^3.2.4"
5579+
commander "^11.0.0"
5580+
email-addresses "^5.0.0"
5581+
filenamify "^4.3.0"
5582+
find-cache-dir "^3.3.1"
5583+
fs-extra "^11.1.1"
5584+
globby "^6.1.0"
5585+
55515586
git-up@^7.0.0:
55525587
version "7.0.0"
55535588
resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467"
@@ -5573,7 +5608,7 @@ glob-to-regexp@^0.4.1:
55735608
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
55745609
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
55755610

5576-
glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@^7.2.3:
5611+
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@^7.2.3:
55775612
version "7.2.3"
55785613
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
55795614
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
@@ -5632,6 +5667,17 @@ globby@^11.0.3, globby@^11.0.4, globby@^11.1.0:
56325667
merge2 "^1.4.1"
56335668
slash "^3.0.0"
56345669

5670+
globby@^6.1.0:
5671+
version "6.1.0"
5672+
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
5673+
integrity sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==
5674+
dependencies:
5675+
array-union "^1.0.1"
5676+
glob "^7.0.3"
5677+
object-assign "^4.0.1"
5678+
pify "^2.0.0"
5679+
pinkie-promise "^2.0.0"
5680+
56355681
gopd@^1.0.1:
56365682
version "1.0.1"
56375683
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
@@ -7140,7 +7186,7 @@ nullthrows@^1.1.1:
71407186
resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1"
71417187
integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==
71427188

7143-
object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1:
7189+
object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
71447190
version "4.1.1"
71457191
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
71467192
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
@@ -7509,6 +7555,23 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
75097555
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
75107556
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
75117557

7558+
pify@^2.0.0:
7559+
version "2.3.0"
7560+
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
7561+
integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==
7562+
7563+
pinkie-promise@^2.0.0:
7564+
version "2.0.1"
7565+
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
7566+
integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==
7567+
dependencies:
7568+
pinkie "^2.0.0"
7569+
7570+
pinkie@^2.0.0:
7571+
version "2.0.4"
7572+
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
7573+
integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==
7574+
75127575
pkg-dir@^4.1.0:
75137576
version "4.2.0"
75147577
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"

0 commit comments

Comments
 (0)