Skip to content

Commit

Permalink
fix: change prod deployment branch to vercel branch to fix maxDuratio…
Browse files Browse the repository at this point in the history
…n bug (#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 <93511091+douxiaobo@users.noreply.github.com>

* Update deploy-prep.yml

* refactor: format code

* Added if condition to disable deployments on forks

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Update deploy-prep.yml

Co-authored-by: Dou Xiaobo <93511091+douxiaobo@users.noreply.github.com>
Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
Co-authored-by: rickstaa <rick.staa@outlook.com>
  • Loading branch information
4 people committed Jan 24, 2023
1 parent 4b17300 commit b2bf4fa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/deploy-prep.py
@@ -0,0 +1,10 @@
import os

file = open('./vercel.json', 'r')
str = file.read()
file = open('./vercel.json', 'w')

str = str.replace('"maxDuration": 10', '"maxDuration": 30')

file.write(str)
file.close()
20 changes: 20 additions & 0 deletions .github/workflows/deploy-prep.yml
@@ -0,0 +1,20 @@
name: Deployment Prep
on:
workflow_dispatch:
push:
branches:
- master

jobs:
config:
if: github.repository == 'anuraghazra/github-readme-stats'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deployment Prep
run: python ./.github/workflows/deploy-prep.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: vercel
create_branch: true
push_options: "--force"
2 changes: 1 addition & 1 deletion vercel.json
Expand Up @@ -2,7 +2,7 @@
"functions": {
"api/*.js": {
"memory": 128,
"maxDuration": 30
"maxDuration": 10
}
},
"redirects": [
Expand Down

1 comment on commit b2bf4fa

@vercel
Copy link

@vercel vercel bot commented on b2bf4fa Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.