-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.66 KB
/
deploy.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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Deploy workflow
# The event triggers are configured as following:
# - on any pull request, trigger the workflow
# This is to avoid running the workflow twice on pull requests.
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
id: pnpm-install
with:
run_install: false
- name: Setup Node (uses version in .nvmrc)
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Building application
run: pnpm build
- name: Deploying to surge (staging)
run: pnpm run deploy
env:
APPLICATION_ID: ${{ secrets.APPLICATION_ID_STAGING }}
APPLICATION_URL: https://graphql-explorer-commercetools-staging.surge.sh
HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }}
CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
- name: Deploying to surge (production eu)
run: pnpm run deploy
env:
APPLICATION_ID: ${{ secrets.APPLICATION_ID_PRODUCTION_EU }}
APPLICATION_URL: https://graphql-explorer-commercetools-production-eu.surge.sh
HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }}
CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}