From 8ab642ffb3582e82aebce3f45c449bd5cb2cc4af Mon Sep 17 00:00:00 2001 From: Fernando Daciuk Date: Mon, 20 Nov 2023 16:37:36 -0300 Subject: [PATCH] feat: add github action to change username and email --- .github/workflows/pre-deploy-mintlify.yml | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pre-deploy-mintlify.yml diff --git a/.github/workflows/pre-deploy-mintlify.yml b/.github/workflows/pre-deploy-mintlify.yml new file mode 100644 index 0000000..8fbb1dc --- /dev/null +++ b/.github/workflows/pre-deploy-mintlify.yml @@ -0,0 +1,31 @@ +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