Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to use simpler strategy to publish files #8

Open
Konard opened this issue Nov 14, 2020 · 0 comments
Open

Attempt to use simpler strategy to publish files #8

Konard opened this issue Nov 14, 2020 · 0 comments

Comments

@Konard
Copy link
Member

Konard commented Nov 14, 2020

git clone "https://$REPOSITORY" gh-pages
cd gh-pages || exit
git remote rm origin
git remote add origin "https://linksplatform:$GITHUB_TOKEN@$REPOSITORY.git"
git fetch
git checkout $TARGET_BRANCH
find -not -path "./.git/*" -not -name ".git" -delete
cd ..
npm i
npm run export
cp -a out/. gh-pages/
cd gh-pages
git config user.name "$COMMIT_USER_NAME"
git config user.email "$COMMIT_USER_EMAIL"
git add --all
git commit -m "Deploy to GitHub Pages: $SHA" || exit
git push

https://stackoverflow.com/questions/3311774/how-to-convert-existing-non-empty-directory-into-a-git-working-directory-and-pus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant