-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.15 KB
/
dev.yml
File metadata and controls
44 lines (37 loc) · 1.15 KB
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
name: "Build & Deploy to Dev"
env:
DOCKER_VERSION: ${{ github.sha }}
NODE_VERSION: 20.x
on:
push:
branches:
- develop
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & push docker images
run: make docker ENVIRONMENT=-dev APP_DIR=new-branding NEXT_PUBLIC_BRIDGE_URL=${{ secrets.DEV_NEXT_PUBLIC_BRIDGE_URL }} NEXT_PUBLIC_CMS_API_URL=${{ secrets.DEV_NEXT_PUBLIC_CMS_API_URL }} CMS_API_URL=${{ secrets.DEV_CMS_API_URL }}
deploy:
needs: build-dev
runs-on: ubuntu-latest
steps:
- name: Deploy to DEV server via SSH
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.DEV_SERVER_HOST }}
username: ${{ secrets.DEV_SERVER_USER }}
key: ${{ secrets.DEV_SERVER_SSH_KEY }}
script: ${{ secrets.DEV_DEPLOY_SCRIPT }}