Skip to content

Commit 39b3800

Browse files
authored
CI features (#1)
* Try CI * CI * CI * CI * Add stg and prd
1 parent 3982caa commit 39b3800

File tree

4 files changed

+131
-0
lines changed

4 files changed

+131
-0
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy develop
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
deploy:
8+
name: Deploy
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: actions/checkout@v2
14+
with:
15+
repository: itering/actions
16+
path: .github/actions
17+
persist-credentials: false
18+
ssh-key: "${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}"
19+
20+
- uses: ./.github/actions/smart-vercel
21+
name: Deploy to Vercel
22+
id: smart-vercel
23+
with:
24+
vercel_token: ${{ secrets.VERCEL_TOKEN }}
25+
node_version: 18
26+
dist_path: dist
27+
vercel_group: itering
28+
preview_output: true
29+
project_name: helix-docs
30+
enable_cache: true
31+
enable_notify_comment: true
32+
enable_notify_slack: true
33+
slack_channel: helix-ui
34+
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

.github/workflows/deploy-prd.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy production
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/checkout@v2
16+
with:
17+
repository: itering/actions
18+
path: .github/actions
19+
persist-credentials: false
20+
ssh-key: "${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}"
21+
22+
- uses: ./.github/actions/smart-vercel
23+
name: Deploy to Vercel
24+
id: smart-vercel
25+
with:
26+
vercel_token: ${{ secrets.VERCEL_TOKEN }}
27+
node_version: 18
28+
dist_path: dist
29+
vercel_group: itering
30+
preview_output: true
31+
project_name: helix-docs
32+
prod_mode: true
33+
enable_cache: true
34+
enable_notify_slack: true
35+
slack_channel: helix-ui
36+
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

.github/workflows/deploy-stg.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy staging
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
deploy:
9+
name: Deploy
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions/checkout@v2
15+
with:
16+
repository: itering/actions
17+
path: .github/actions
18+
persist-credentials: false
19+
ssh-key: "${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}"
20+
21+
- uses: ./.github/actions/smart-vercel
22+
name: Deploy to Vercel
23+
id: smart-vercel
24+
with:
25+
vercel_token: ${{ secrets.VERCEL_TOKEN }}
26+
node_version: 18
27+
dist_path: dist
28+
vercel_group: itering
29+
preview_output: true
30+
project_name: helix-docs
31+
enable_cache: true
32+
enable_notify_slack: true
33+
slack_channel: helix-ui
34+
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
35+

vercel.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"headers": [
3+
{
4+
"source": "/(.*)",
5+
"headers": [
6+
{
7+
"key": "X-Content-Type-Options",
8+
"value": "nosniff"
9+
},
10+
{
11+
"key": "Referrer-Policy",
12+
"value": "origin-when-cross-origin"
13+
},
14+
{
15+
"key": "X-Frame-Options",
16+
"value": "SAMEORIGIN"
17+
},
18+
{
19+
"key": "Strict-Transport-Security",
20+
"value": "max-age=2592000"
21+
}
22+
]
23+
}
24+
],
25+
"rewrites": [{ "source": "/:path*", "destination": "/index.html" }]
26+
}

0 commit comments

Comments
 (0)