Answer the question
In order to leave comments, you need to log in
How to upload a built project to GitHub using gulp?
I'm just starting to learn gulp, so there are some difficulties.
I can't find on the internet how to solve this problem.
The bottom line is that I have an assembly that collects the final build in a folder, but I don’t understand how to make a task that will upload this build to GH.
I know that this can also be done through GIT, but my task is to make a script that would upload a new build to GH itself.
I found "gulp-gh-pages" but can't figure out how to set it up to link with GH.
How I do:
1. in the github.js file
import git from "gulp-gh-pages";
export const github = () => {
return app.gulp
.src(`${app.path.build}/**/*.*`)
.pipe(git());
};
import { github } from "./gulp/tasks/github.js";
const deployGitHub = gulp.series(reset(очистка), mainTasks(сборка), github);
export { deployGitHub }
"scripts": {
"deployGitHub": "gulp deployGitHub",
},
Answer the question
In order to leave comments, you need to log in
Look at the date of publication (update) of the gulp-gh-pages package 6 years (4 years) - during this time, two-factor authorization was introduced on GIT and the old (weakly protected) methods for authorization and deployment were disabled. Look for more recent solutions. And use tokens for deployment.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question