feat: warning if release is in under 14 days #808
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Prod | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Update bbn.one | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull Project | |
uses: actions/checkout@v4.1.6 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.3.0 | |
- name: cache deno installation and deno.land dependencies | |
uses: actions/cache@v4.0.2 | |
with: | |
key: ${{ runner.os }}-deno-${{ hashFiles('**/*') }} | |
restore-keys: ${{ runner.os }}-deno- | |
path: | | |
/home/runner/.deno | |
/home/runner/.cache/deno/deps/* | |
- name: install or update deno installation | |
run: | | |
export DENO_INSTALL="/home/runner/.deno" | |
export PATH="${DENO_INSTALL}/bin:${PATH}" | |
mkdir -p "${DENO_INSTALL}" | |
deno upgrade || ( | |
curl -fsSL https://deno.land/x/install/install.sh > "${DENO_INSTALL}/.sh"; | |
sh "${DENO_INSTALL}/.sh" | |
) | |
echo "DENO_INSTALL=${DENO_INSTALL}" >> $GITHUB_ENV | |
echo "PATH=${PATH}" >> $GITHUB_ENV | |
deno upgrade | |
- name: Lint | |
run: deno lint | |
- name: Building bbn.one | |
run: deno run -A serve.ts build | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3.2.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Build and push | |
uses: docker/build-push-action@v5.4.0 | |
with: | |
context: . | |
push: true | |
tags: "ghcr.io/bbn-holding/bbnone:latest" | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script: cd bbn/ && docker compose up -d --pull always frontend |