Skip to content

Commit

Permalink
feat: add git user
Browse files Browse the repository at this point in the history
  • Loading branch information
punchanabu committed Sep 15, 2024
1 parent 1798599 commit 41e3304
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,35 @@ name: Sync and Deploy to Vercel
on:
push:
branches:
- dev
- feat/deploy-preview

jobs:
sync-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Push to Personal Repo
env:
PERSONAL_REPO: https://x-access-token:${{ secrets.PERSONAL_GITHUB_TOKEN }}@github.com/korawit-alt/sucu-frontend-preview.git
run: |
git remote add personal $PERSONAL_REPO
git push personal HEAD:dev --force
- name: Set up Git user
run: |
git config user.name "korawit-alt"
git config user.email "[email protected]"
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
working-directory: '.'
- 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

0 comments on commit 41e3304

Please sign in to comment.