feat: updated ci #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name: Express CI | |
# on: | |
# push: | |
# branches: [main] | |
# pull_request: | |
# branches: [main] | |
# jobs: | |
# build: | |
# runs-on: e-commerce | |
# defaults: | |
# run: | |
# working-directory: /home/e-commerce-be/e-commerce | |
# steps: | |
# - name: Check current directory | |
# run: pwd && ls -la | |
# - name: Initialize Git repository if not exists | |
# run: | | |
# if [ ! -d .git ]; then | |
# git init | |
# git remote add origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git | |
# fi | |
# - name: Configure Git | |
# run: | | |
# git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
# git config --global user.name "github-actions[bot]" | |
# - name: Fetch and reset repository | |
# run: | | |
# git fetch origin | |
# git checkout main || git checkout -b main | |
# git reset --hard origin/main |