Skip to content

Commit

Permalink
set remote url with gh token for delete preview (MetaMask#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ authored Apr 26, 2023
1 parent 654e01a commit ae69fae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/delete-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ jobs:
uses: actions/checkout@v3
with:
ref: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
- name: Delete Branch Folder on gh-pages
if: ${{ github.event.pull_request.head.ref != 'wallet' && github.event.pull_request.head.ref != 'snaps' && github.event.pull_request.head.ref != 'guide' && github.event.pull_request.head.ref != 'assets' && github.event.pull_request.head.ref != 'img' && github.event.pull_request.head.ref != 'search' }}
run: |
git config --local user.name "Metamask Preview Bot"
git config --local user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git rm -r "${BRANCH_NAME}"
git commit -m "Delete ${BRANCH_NAME} folder from gh-pages branch"
git push origin gh-pages
env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ae69fae

Please sign in to comment.