-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.57 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deployment
on: [pull_request]
# implement on Merge
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build
run: |
yarn install
lerna bootstrap
lerna run build --stream
lerna run build:deployment --stream
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT_ID_WEP_DEV }}
service_account_key: ${{ secrets.GCP_SA_KEY_WEP_DEV }}
export_default_credentials: true
- name: Use gcloud CLI
env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
run: |
gsutil cp ./packages/core/dist/index.html gs://dreifuss-wysiwyg-editor.wepublish.dev/${BRANCH_NAME}/index.html
gsutil cp ./packages/core/dist/index_bundle.js gs://dreifuss-wysiwyg-editor.wepublish.dev/${BRANCH_NAME}/index_bundle.js
- name: Slack Notification
if: success()
uses: rtCamp/action-slack-notify@master
env:
SLACK_CHANNEL: dev
SLACK_COLOR: '#3278BD'
SLACK_ICON: https://github.com/wepublish.png?size=48
SLACK_MESSAGE: 'Deployment successful! https://dreifuss-wysiwyg-editor.wepublish.dev/${{ github.event.pull_request.head.ref }}'
SLACK_TITLE: 'dreifuss-wysiwyg-editor Deployment'
SLACK_USERNAME: 'Github (dreifuss-wysiwyg-editor)'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WP_DEV_CHANNEL }}