Skip to content

Commit 3499a6c

Browse files
committed
feat(ci): use shared deploy workflow
1 parent e8d3772 commit 3499a6c

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed
Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# .github/workflows/sync-to-production.yml
2-
31
name: Sync main to sandbox-production
42

53
on:
@@ -14,30 +12,5 @@ jobs:
1412
runs-on: ubuntu-latest
1513

1614
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0 # Fetch all history so we can force push
21-
22-
- name: Set up Git
23-
run: |
24-
git config --global user.name 'github-actions[bot]'
25-
git config --global user.email 'github-actions[bot]@livekit.io'
26-
27-
- name: Sync to sandbox-production
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
run: |
31-
git checkout sandbox-production || git checkout -b sandbox-production
32-
git merge --strategy-option theirs main
33-
git push origin sandbox-production
34-
35-
- name: Tag the deployment
36-
if: github.ref == 'refs/heads/main'
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: |
40-
# Increment version from previous tag of format vX
41-
VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//' | awk -F. -v OFS=. '{$NF++;print}')
42-
git tag -a "v$VERSION" -m "Deploy v$VERSION to production"
43-
git push origin "v$VERSION"
15+
- name: Sync main to production branch and increment version
16+
uses: livekit-examples/sandbox-deploy-action

0 commit comments

Comments
 (0)