Skip to content

Commit cf539a6

Browse files
author
Alex Patterson
committed
add all the env actions
1 parent 0b4f34b commit cf539a6

File tree

8 files changed

+188
-2
lines changed

8 files changed

+188
-2
lines changed

.github/workflows/dev-frontend-admin-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: dev-frontend-admin-deploy
22

33
on:
44
push:
5-
branches: [ dev, stage, main ]
5+
branches: [ dev ]
66
paths: 'frontend/admin/**'
77
workflow_dispatch:
88

.github/workflows/dev-frontend-main-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: dev-frontend-main-deploy
22

33
on:
44
push:
5-
branches: [ dev, stage, main ]
5+
branches: [ dev ]
66
paths: 'frontend/main/**'
77
workflow_dispatch:
88

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: main-frontend-admin-deploy
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: 'frontend/admin/**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
tag:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Bump version and push tag
15+
id: tag_version
16+
uses: mathieudutour/github-tag-action@v5.1
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
tag_prefix: admin
20+
release_branches: main
21+
- name: Create a GitHub release
22+
uses: actions/create-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
27+
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
28+
body: ${{ steps.tag_version.outputs.changelog }}
29+
deploy:
30+
needs: tag
31+
environment: main
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: checkout
35+
uses: actions/checkout@v2
36+
# Deploy
37+
- name: Deploy ${GITHUB_REF##*/} to Vercel
38+
uses: amondnet/vercel-action@v19
39+
id: vercel-action-staging
40+
with:
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
vercel-org-id: ${{ secrets.VERCEL_ADMIN_ORG_ID }}
43+
vercel-project-id: ${{ secrets.VERCEL_ADMIN_PROJECT_ID }}
44+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
45+
vercel-args: '--prod'
46+
working-directory: ./frontend/admin
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: main-frontend-main-deploy
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: 'frontend/main/**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
tag:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Bump version and push tag
15+
id: tag_version
16+
uses: mathieudutour/github-tag-action@v5.1
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
tag_prefix: main
20+
release_branches: main
21+
- name: Create a GitHub release
22+
uses: actions/create-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
27+
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
28+
body: ${{ steps.tag_version.outputs.changelog }}
29+
deploy:
30+
needs: tag
31+
environment: main
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: checkout
35+
uses: actions/checkout@v2
36+
# Deploy
37+
- name: Deploy ${GITHUB_REF##*/} to Vercel
38+
uses: amondnet/vercel-action@v19
39+
id: vercel-action-staging
40+
with:
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
vercel-org-id: ${{ secrets.VERCEL_MAIN_ORG_ID }}
43+
vercel-project-id: ${{ secrets.VERCEL_MAIN_PROJECT_ID }}
44+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
45+
vercel-args: '--prod'
46+
working-directory: ./frontend/main
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: stage-frontend-admin-deploy
2+
3+
on:
4+
push:
5+
branches: [ stage ]
6+
paths: 'frontend/admin/**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
tag:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Bump version and push tag
15+
id: tag_version
16+
uses: mathieudutour/github-tag-action@v5.1
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
tag_prefix: admin
20+
release_branches: main
21+
- name: Create a GitHub release
22+
uses: actions/create-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
27+
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
28+
body: ${{ steps.tag_version.outputs.changelog }}
29+
deploy:
30+
needs: tag
31+
environment: stage
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: checkout
35+
uses: actions/checkout@v2
36+
# Deploy
37+
- name: Deploy ${GITHUB_REF##*/} to Vercel
38+
uses: amondnet/vercel-action@v19
39+
id: vercel-action-staging
40+
with:
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
vercel-org-id: ${{ secrets.VERCEL_ADMIN_ORG_ID }}
43+
vercel-project-id: ${{ secrets.VERCEL_ADMIN_PROJECT_ID }}
44+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
45+
vercel-args: '--prod'
46+
working-directory: ./frontend/admin
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: stage-frontend-main-deploy
2+
3+
on:
4+
push:
5+
branches: [ stage ]
6+
paths: 'frontend/main/**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
tag:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Bump version and push tag
15+
id: tag_version
16+
uses: mathieudutour/github-tag-action@v5.1
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
tag_prefix: main
20+
release_branches: main
21+
- name: Create a GitHub release
22+
uses: actions/create-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
27+
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
28+
body: ${{ steps.tag_version.outputs.changelog }}
29+
deploy:
30+
needs: tag
31+
environment: stage
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: checkout
35+
uses: actions/checkout@v2
36+
# Deploy
37+
- name: Deploy ${GITHUB_REF##*/} to Vercel
38+
uses: amondnet/vercel-action@v19
39+
id: vercel-action-staging
40+
with:
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
vercel-org-id: ${{ secrets.VERCEL_MAIN_ORG_ID }}
43+
vercel-project-id: ${{ secrets.VERCEL_MAIN_PROJECT_ID }}
44+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
45+
vercel-args: '--prod'
46+
working-directory: ./frontend/main

frontend/admin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ yarn-error.log*
3232

3333
# vercel
3434
.vercel
35+
*.env

frontend/main/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ yarn-error.log*
3232

3333
# vercel
3434
.vercel
35+
*.env

0 commit comments

Comments
 (0)