Skip to content

feat: add github action to change username and email #2

feat: add github action to change username and email

feat: add github action to change username and email #2

name: "Pre deploy Mintlify"
on:
push:
branches:
- main
- test-gh-action
jobs:
release:
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