actions ci

This commit is contained in:
Jonathan Branan 2024-11-02 20:43:00 -05:00
parent 678d6f84dc
commit 9ea6e470e2
3 changed files with 45 additions and 37 deletions

View File

@ -10,35 +10,45 @@ jobs:
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
steps: steps:
- - uses: actions/checkout@v4
name: Set up Docker Buildx - name: Set Node.js 22.x
uses: docker/setup-buildx-action@v3 uses: actions/setup-node@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with: with:
registry: git.jonb.io node-version: 22.x
username: ${{ gitea.actor }} cache: 'yarn'
password: ${{ secrets.JONBIO_CI }} cache-dependency-path: 'yarn.lock'
- run: yarn install
name: Build and push run: EXPORT=1 UNOPTIMIZED=1 yarn build
uses: docker/build-push-action@v6
with:
push: true
tags: git.jonb.io/jblu/jonbio:latest
cache-from: type=registry,ref=git.jonb.io/jblu/jonbio:buildcache
cache-to: type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
deploy: # -
runs-on: ubuntu-latest # name: Set up Docker Buildx
env: # uses: docker/setup-buildx-action@v3
RUNNER_TOOL_CACHE: /toolcache # -
steps: # name: Login to Docker Hub
- # uses: docker/login-action@v3
name: Deploy App # with:
uses: fjogeleit/http-request-action@v1 # registry: git.jonb.io
with: # username: ${{ gitea.actor }}
url: 'http://192.168.4.11:7777/v1/update' # password: ${{ secrets.JONBIO_CI }}
method: 'GET' # -
bearerToken: ${{ secrets.DEPLOYTOKEN }} # name: Build and push
timeout: 60000 # uses: docker/build-push-action@v6
# with:
# push: true
# tags: git.jonb.io/jblu/jonbio:latest
# cache-from: type=registry,ref=git.jonb.io/jblu/jonbio:buildcache
# cache-to: type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
# deploy:
# runs-on: ubuntu-latest
# env:
# RUNNER_TOOL_CACHE: /toolcache
# steps:
# -
# name: Deploy App
# uses: fjogeleit/http-request-action@v1
# with:
# url: 'http://192.168.4.11:7777/v1/update'
# method: 'GET'
# bearerToken: ${{ secrets.DEPLOYTOKEN }}
# timeout: 60000

View File

@ -3,10 +3,8 @@ FROM node:22-alpine
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
COPY . /app COPY ./out /app/out
RUN corepack enable RUN npm install serve
RUN yarn;
RUN yarn build;
ENV NODE_ENV=production ENV NODE_ENV=production
ENV PORT=3000 ENV PORT=3000
@ -14,4 +12,4 @@ ENV HOSTNAME="0.0.0.0"
EXPOSE 3000 EXPOSE 3000
CMD ["yarn", "serve"] CMD ["npx", "serve", "out"]

View File

@ -1,9 +1,9 @@
/** @type {import("pliny/config").PlinyConfig } */ /** @type {import("pliny/config").PlinyConfig } */
const siteMetadata = { const siteMetadata = {
title: 'Jonathan\'s Blog and Likes', title: "Jonathan's Blog and Likes",
author: 'Jonathan Branan', author: 'Jonathan Branan',
headerTitle: 'JonB.IO', headerTitle: 'JonB.IO',
description: 'Thought\'s from someone with an internet connection.', description: "Thought's from someone with an internet connection.",
language: 'en-us', language: 'en-us',
theme: 'system', // system, dark or light theme: 'system', // system, dark or light
siteUrl: 'https://jonb.io', siteUrl: 'https://jonb.io',