Skip to content

Commit

Permalink
feat: add github action to change username and email
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarcosp authored and fdaciuk committed Nov 20, 2023
1 parent 2350c5c commit 4fc6de0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pre-deploy-mintlify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Pre-deploy Mintlify"

on:
push:
branches:
- main
- test-gh-action

jobs:
release:
name: Change email
runs-on: ubuntu-latest
steps:
- name: 🏗 Checkout files
uses: actions/checkout@v3
with:
fetch-depth: 0
# token: ${{ env.GH_TOKEN }}

- name: 🔧 Configure Git
run: |
git config --global user.name "Marcos Oliveira"
git config --global user.email "vmarcosp.pereira@gmail.com"
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" != "vmarcosp.pereira@gmail.com" ];
then
GIT_AUTHOR_NAME="Marcos Oliveira";
GIT_AUTHOR_EMAIL="vmarcosp.pereira@gmail.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
git push origin ${GITHUB_REF##*/} -f

0 comments on commit 4fc6de0

Please sign in to comment.