Skip to content

chore(deps): Bump @babel/traverse from 7.15.0 to 7.23.2 in /frontend #34

chore(deps): Bump @babel/traverse from 7.15.0 to 7.23.2 in /frontend

chore(deps): Bump @babel/traverse from 7.15.0 to 7.23.2 in /frontend #34

name: Deploy
on:
pull_request_target:
types:
- reopened
- opened
- synchronize
jobs:
deploy_staging:
name: Deploy preview
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [ '16.x' ]
os: [ ubuntu-latest ]
steps:
# setup
- name: Checkout out the repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 tlse2021-ci-cd
# frontend
- name: Build and push the frontend image
uses: docker/build-push-action@v2
with:
push: true
context: ./frontend
tags:
ghcr.io/thenativeweb/tlse-frontend:pr-${{ github.event.number }}
build-args: |
"BACKEND_URL=https://api.pr-${{ github.event.number }}.gitops.tlse.thenativeweb.io"
- name: Insert config to manifest
run: 'cat ./deployments/frontend-staging.yaml | envsubst > manifest.yaml'
env:
CONTAINER_REGISTRY_USER: ${{ secrets.GHCR_USER }}
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GHCR_PASSWORD }}
PR_NUMBER: ${{ github.event.number }}
- name: Deploy the manifest for the frontend
run: kubectl apply -f ./manifest.yaml
- name: Verify deployment for the frontend
run: kubectl --namespace tlse-pr-${{ github.event.number }} rollout status deployment/tlse-frontend
# backend
- name: Build and push the backend image
uses: docker/build-push-action@v2
with:
push: true
context: ./backend
tags:
ghcr.io/thenativeweb/tlse-backend:pr-${{ github.event.number }}
- name: Insert config to manifest
run: 'cat ./deployments/backend-staging.yaml | envsubst > manifest.yaml'
env:
CONTAINER_REGISTRY_USER: ${{ secrets.GHCR_USER }}
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GHCR_PASSWORD }}
PR_NUMBER: ${{ github.event.number }}
- name: Deploy the manifest for the backend
run: kubectl apply -f ./manifest.yaml
- name: Verify deployment for the backend
run: kubectl --namespace tlse-pr-${{ github.event.number }} rollout status deployment/tlse-backend