diff --git a/deploy-script.js b/deploy-script.js new file mode 100644 index 000000000..60242c09c --- /dev/null +++ b/deploy-script.js @@ -0,0 +1,14 @@ +const ghpages = require("gh-pages"); + +ghpages.publish("dist", { + branch: "gh-pages", + repo: "https://github.com/sebastianberge/sebastianberge.github.io.git", // Make sure this is your repository URL + user: { + name: "Sebastian Berge", + email: "sebastian@berge.im", + }, + silent: false, + dotfiles: true, + message: "Deploy commit", + token: process.env.GH_PAT, // Use the environment variable here +}); diff --git a/package.json b/package.json index e1dfe9958..f1aed6c91 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "predeploy": "npm run build", - "deploy": "gh-pages -d build", + "deploy": "node deploy-script.js", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test",