documentation for github deploy is wrong.
See original GitHub issue- I fixed the path error, obviously it was for the node path module.
- when publishing to git for some reason with the gh-pages branch it deploys an older commit.
tasks.set('publish', () => {
const remote = {
url: 'https://github.com/lifeiscontent/OpenPoGoUI.git',
branch: 'gh-pages',
};
global.DEBUG = process.argv.includes('--debug') || false;
const spawn = require('child_process').spawn;
const opts = {
cwd: path.resolve(__dirname, './public'),
stdio: ['ignore', 'inherit', 'inherit'],
};
const git = (...args) => new Promise((resolve, reject) => {
spawn('git', args, opts).on('close', code => {
if (code === 0) {
resolve();
} else {
reject(new Error(`git ${args.join(' ')} => ${code} (error)`));
}
});
});
return Promise.resolve()
.then(() => run('clean'))
.then(() => git('init', '--quiet'))
.then(() => git('config', '--get', 'remote.origin.url')
.then(() => git('remote', 'set-url', 'origin', remote.url))
.catch(() => git('remote', 'add', 'origin', remote.url))
)
.then(() => git('ls-remote', '--exit-code', remote.url, 'master')
.then(() => Promise.resolve()
.then(() => git('fetch', 'origin'))
.then(() => git('reset', `origin/${remote.branch}`, '--hard'))
.then(() => git('clean', '--force'))
)
.catch(() => Promise.resolve())
)
.then(() => run('build'))
.then(() => git('add', '.', '--all'))
.then(() => git('commit', '--message', new Date().toUTCString())
.catch(() => Promise.resolve()))
.then(() => git('push', 'origin', `HEAD:${remote.branch}`, '--force', '--set-upstream'));
});
here’s the task code.
it seems that my public/index.ejs gets overwritten also.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Build errors during deployment to GitHub Pages · Issue #209
I am failed to deploy the ai-folio theme in my personal repository. Even I don't find any fruitful reason why it is happening....
Read more >Error when deploying to GitHub Pages · Issue #1803
I get an error, when I try to deploy to GitHub Pages. ... Building documentation to directory: C:\Users\Me\Documents\Git\repo\site WARNING ...
Read more >About Jekyll build errors for GitHub Pages sites
If Jekyll encounters an error building your GitHub Pages site locally or on GitHub, you'll receive an error message with more information.
Read more >Configuring a publishing source for your GitHub Pages site
Under "Build and deployment", under "Source", select Deploy from a branch. ... build and you'll get a page build error message for a...
Read more >Deploy fails with "ERROR: Repository not found." after build.
When I deploy my docusaurus site onto my organizations github I get the following error: ~/catkin_ws/src/nautilus_stack/docs (master) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@koistya here’s the updated task that I am using with the
gh-pages
npm module.@josephdburdick what @frenzzy said ^^ Also, take a look at the “baseUrl” property in the “history” module docs.