Skip to content

Commit

Permalink
Merge pull request #1 from carstendraschner/deploy-command
Browse files Browse the repository at this point in the history
Add npm script to deploy website to GitHub pages
  • Loading branch information
carstendraschner authored Nov 13, 2024
2 parents 62fb19a + 2e2a6ca commit 28ba631
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 28ba631

Please sign in to comment.