Skip to content

Merge branch 'main' into feat/nodemailer #16

Merge branch 'main' into feat/nodemailer

Merge branch 'main' into feat/nodemailer #16

Workflow file for this run

on:
push:
paths: ['apps/web/**', '.github/workflows/web.yaml']
pull_request:
paths: ['apps/web/**']
jobs:
validate:
runs-on: ubuntu-latest
name: Validate
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install packages
run: |
pnpm i
- name: Lint
run: |
pnpm run lint:web
- name: Test
run: |
pnpm run test:web
build:
needs: validate
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Build and push docker image
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -t keyshade/keyshade-web:latest -f Dockerfile-web .
- name: Push Docker image
run: docker push keyshade/keyshade-web
deploy:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Deploy to Render
steps:
- name: deploy
run: curl ${{ secrets.RENDER_WEB_DEPLOY_HOOK }}