File tree Expand file tree Collapse file tree 2 files changed +43
-18
lines changed Expand file tree Collapse file tree 2 files changed +43
-18
lines changed Original file line number Diff line number Diff line change 11name : CI
22
33on :
4- push :
4+ pull_request :
55 branches :
6- - ' ** '
6+ - main
77
88jobs :
99 build :
1010 runs-on : ubuntu-latest
1111 steps :
12- - uses : actions/setup-node@v1
12+ - uses : actions/checkout@v2
13+ - uses : actions/cache@v2
1314 with :
14- node-version : 12.x
15- - uses : actions/checkout@v1
16- - name : npm install, build, and test
17- env :
18- CI : true
19- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20- run : |
21- npm ci
22- npm run build
23- - name : vercel deploy
24- if : ${{ github.ref == 'refs/heads/main' }}
25- run : vercel --token ${{ secrets.VERCEL_TOKEN }} deploy --prod
26- env :
27- VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
28- VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
15+ path : ~/.npm
16+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
17+ restore-keys : |
18+ ${{ runner.os }}-node-
19+ - run : npm ci
20+ - name : build
21+ run : npm run build -- --locale en
Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - uses : actions/cache@v2
14+ with :
15+ path : ~/.npm
16+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
17+ restore-keys : |
18+ ${{ runner.os }}-node-
19+ - run : npm ci
20+ - name : build
21+ run : |
22+ npm run generate-markdown
23+ npm run crowdin:sync
24+ npm run build
25+ env :
26+ CROWDIN_PERSONAL_TOKEN : ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
27+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ - name : vercel deploy
29+ run : vercel --token ${{ secrets.VERCEL_TOKEN }} deploy --prod
30+ env :
31+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
32+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
You can’t perform that action at this time.
0 commit comments