Skip to content

Commit

Permalink
Add npm script to deploy website to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
xkons committed Nov 13, 2024
1 parent 62fb19a commit 2e2a6ca
Show file tree
Hide file tree
Showing 5 changed files with 373 additions and 55 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/deploy.yml

This file was deleted.

19 changes: 19 additions & 0 deletions _utils/deploy.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const ghpages = require('gh-pages');

console.log('Starting to deploy to GitHub Pages');

ghpages.publish(
'_site',
{
branch: 'gh-pages',
repo: 'https://github.com/carstendraschner/my_website.git',
},
function (err) {
if (err) {
console.log('Error while deploying: ' + err);
} else {
// TODO: add production URL to log here
console.log('Successfully deployed to <ADD_URL>');
}
}
);
Loading

0 comments on commit 2e2a6ca

Please sign in to comment.