forked from aceleradora-TW/e-acelera-back
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (34 loc) · 1.2 KB
/
prod-deploy.yml
File metadata and controls
44 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Production Deploy
on:
workflow_dispatch:
concurrency:
group: prod
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sync staging branch with main
run: |
git config user.name "eacelera-back-deploy-bot[bot]"
git config user.email "eacelera-back-deploy-bot[bot]@users.noreply.github.com"
git fetch origin
if git ls-remote --exit-code --heads origin staging; then
git checkout -B staging origin/staging
else
git checkout -B staging
fi
git reset --hard origin/main
git push origin staging --force
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to production
run: |
echo "Starting production deploy..."
echo "Commit from main being deployed: $(git rev-parse origin/main)"
echo "Vercel will handle the build & deployment."
echo "Check Vercel dashboard for deployment status at: https://vercel.com/aceleradora-agils-projects/e-acelera-back/deployments?environment=production"