Skip to content

Attempt to use simpler strategy to publish files #8

@konard

Description

@konard

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions