Skip to content

Commit f85723e

Browse files
Zo-Bro-23douxiaoboanuraghazrarickstaa
authored andcommitted
fix: change prod deployment branch to vercel branch to fix maxDuration bug (anuraghazra#2424)
* Create deploy-prep.yml * Create deploy-prep.py * Update vercel.json * Update deploy-prep.yml * Update vercel.json * Added coauthor Co-authored-by: Dou Xiaobo <[email protected]> * Update deploy-prep.yml * refactor: format code * Added if condition to disable deployments on forks Co-authored-by: Rick Staa <[email protected]> * Update deploy-prep.yml Co-authored-by: Dou Xiaobo <[email protected]> Co-authored-by: Anurag Hazra <[email protected]> Co-authored-by: rickstaa <[email protected]>
1 parent ab69acd commit f85723e

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/deploy-prep.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import os
2+
3+
file = open('./vercel.json', 'r')
4+
str = file.read()
5+
file = open('./vercel.json', 'w')
6+
7+
str = str.replace('"maxDuration": 10', '"maxDuration": 30')
8+
9+
file.write(str)
10+
file.close()

.github/workflows/deploy-prep.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Deployment Prep
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
config:
10+
if: github.repository == 'anuraghazra/github-readme-stats'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Deployment Prep
15+
run: python ./.github/workflows/deploy-prep.py
16+
- uses: stefanzweifel/git-auto-commit-action@v4
17+
with:
18+
branch: vercel
19+
create_branch: true
20+
push_options: "--force"

0 commit comments

Comments
 (0)