feat: add git user #4
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: Sync and Deploy to Vercel | |
on: | |
push: | |
branches: | |
- feat/deploy-preview | |
jobs: | |
sync-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Git user | |
run: | | |
git config user.name "korawit-alt" | |
git config user.email "test@gmail.com" | |
- name: Mask Personal Access Token | |
run: | | |
echo "::add-mask::${{ secrets.PERSONAL_GITHUB_TOKEN }}" | |
- name: Push to Personal Repo | |
run: | | |
git remote add personal https://x-access-token:${{ secrets.PERSONAL_GITHUB_TOKEN }}@github.com/YOUR_USERNAME/YOUR_PERSONAL_REPO.git | |
git push personal HEAD:main --force | |
- name: Deploy to Vercel | |
uses: amondnet/vercel-action@v20 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-args: '--prod' # Deploy to production | |
working-directory: '.' # Adjust if your project is in a subdirectory |