Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa authored Apr 24, 2024
1 parent 1ae847e commit 08a4376
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy develop

on:
pull_request:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
with:
repository: darwinia-network/devops
path: .github

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
project_name: msgport-home
dist_path: .
script_run: false
enable_cache: true
enable_notify_comment: true
enable_notify_slack: false
slack_channel: darwinia-docs
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

33 changes: 33 additions & 0 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy production

on:
push:
tags:
- 'v*'

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
with:
repository: darwinia-network/devops
path: .github

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
project_name: msgport-home
dist_path: .
prod_mode: true
script_run: false
enable_cache: true
enable_notify_slack: false
slack_channel: darwinia-docs
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
32 changes: 32 additions & 0 deletions .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy staging

on:
push:
branches: [master]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
with:
repository: darwinia-network/devops
path: .github

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
project_name: msgport-home
dist_path: .
script_run: false
enable_cache: true
enable_notify_slack: false
slack_channel: darwinia-docs
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
25 changes: 25 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "origin-when-cross-origin"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=2592000"
}
]
}
]
}

0 comments on commit 08a4376

Please sign in to comment.