From e75f2d96df2a8bffdb0496b73daa41c14714eee3 Mon Sep 17 00:00:00 2001 From: Waylon Walker Date: Sun, 22 Mar 2020 15:55:53 -0500 Subject: [PATCH] Update pages.yml --- .github/workflows/pages.yml | 51 +------------------------------------ 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 9bf1ba3..a5369bd 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -10,54 +10,5 @@ jobs: - uses: actions/checkout@v2 - name: push content run: | - REMOTE="https://${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - COMMITER_NAME="${GITHUB_ACTOR}-github-actions" - COMMITER_EMAIL="${GITHUB_ACTOR}-@users.noreply.github.com" - REMOTE_BRANCH_EXISTS=$(git ls-remote --heads ${REMOTE} ${target_branch} | wc -l) - - mkdir /tmp/github-pages - cd /tmp/github-pages - - if $keep_history && [ $REMOTE_BRANCH_EXISTS -ne 0 ] - then - git clone --quiet --branch ${target_branch} --depth 1 ${REMOTE} . - else - echo remote does not exist - echo initialize repo - git init . - git checkout --orphan gh-pages - fi - - echo "

hello there.

How are you today kind person?

" > index.html - - DIRTY=$(git status --short | wc -l) - - if $keep_history && [ $REMOTE_BRANCH_EXISTS -ne 0 ] && [ $DIRTY = 0 ] - then - echo '⚠️ There are no changes to commit, stopping.' - else - git config user.name ${COMMITER_NAME} - git config user.email ${COMMITER_EMAIL} - git add --all . - git commit -m "DIST to ${target_branch}" --quiet - - echo 🏃 Deploying ${build_dir} directory to ${target_branch} branch on ${repo} repo - - if [ $keep_history = false] - then - git push --quiet ${REMOTE} ${target_branch} - else - git push --quiet --force ${REMOTE} ${target_branch} - fi - echo 🎉 Content of ${build_dir} has been deployed to GitHub Pages. - fi - - - - - - env: - GITHUB_PAT: ${{ secrets.GITHUB_PAT }} - target_branch: gh-pages - keep_history: true + echo hi