Compare commits

..

4 Commits

Author SHA1 Message Date
8b32122191 updated site deployment 2024-11-04 23:18:39 -06:00
f341e246ff updated notifications 2024-11-04 23:18:28 -06:00
b10348b15a Updated rss.mjs
All checks were successful
Build and Deploy docker container / build (push) Successful in 2m47s
2024-11-04 23:00:40 -06:00
ee6e9789bb Merge pull request 'upstream' (#1) from upstream into main
Some checks failed
Build and Deploy docker container / build (push) Failing after 2m25s
Reviewed-on: #1
2024-11-04 22:35:56 -06:00
4 changed files with 36 additions and 39 deletions

View File

@ -1,16 +1,20 @@
name: Build and Deploy docker container
on:
'on':
push:
branches: main
jobs:
build:
runs-on: ubuntu-latest
steps:
# - uses: actions/setup-go@v5
# with:
# go-version: 'stable'
- uses: cstuder/apprise-ga@master
with:
title: 'jonb.io site deployment'
message: >-
Push received on {{ ref }}
Commit by {{ head_commit.author.name }}: {{ head_commit.message |
truncate(128) }} ({{ head_commit.id[0:7] }})
env:
APPRISE_URL: '${{ secrets.APPRISE_URL }}'
- uses: actions/checkout@v4
- name: Install Yarn
run: npm install -g yarn
@ -18,56 +22,48 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'yarn'
# - name: Hash files for cache
# uses: https://gitea.com/actions/go-hashfiles@v0.0.1
# id: get-hash
# with:
# patterns: |-
# **/yarn.lock
# **/*.js
# **/*.jsx
# **/*.ts
# **/*.tsx
cache: yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: '${{ runner.os }}-yarn-${{ hashFiles(''**/yarn.lock'') }}'
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn
- run: EXPORT=1 UNOPTIMIZED=1 yarn build
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.jonb.io
username: ${{ gitea.actor }}
password: ${{ secrets.JONBIO_CI }}
-
name: Build and push
username: '${{ gitea.actor }}'
password: '${{ secrets.JONBIO_CI }}'
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
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
-
name: Deploy App
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
- name: Deploy App
uses: fjogeleit/http-request-action@v1
with:
url: 'http://192.168.4.11:7777/v1/update'
method: 'GET'
bearerToken: ${{ secrets.DEPLOYTOKEN }}
method: GET
bearerToken: '${{ secrets.DEPLOYTOKEN }}'
timeout: 60000
- uses: cstuder/apprise-ga@master
with:
title: 'jonb.io site deployment'
message: Push received on {{ ref }} Commit by {{ head_commit.author.name }}: {{ head_commit.message | truncate(128) }} ({{ head_commit.id[0:7] }}) deployed.
env:
APPRISE_URL: '${{ secrets.APPRISE_URL }}'

View File

@ -1 +1 @@
{"python":1,"projects":1,"code":1,"cygnus":1,"self-hosted":1,"server":1}
{"cygnus":1,"self-hosted":1,"server":1,"python":1,"projects":1,"code":1}

2
next-env.d.ts vendored
View File

@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

View File

@ -3,7 +3,8 @@ import path from 'path'
import { slug } from 'github-slugger'
import { escape } from 'pliny/utils/htmlEscaper.js'
import siteMetadata from '../data/siteMetadata.js'
import tagData from '../app/tag-data.json' assert { type: 'json' }
// Do not accept changes from upstream, you need with instead of assert. See https://stackoverflow.com/questions/78876691/syntaxerror-unexpected-identifier-assert-on-json-import-in-node-v22
import tagData from '../app/tag-data.json' with { type: 'json' }
import { allBlogs } from '../.contentlayer/generated/index.mjs'
import { sortPosts } from 'pliny/utils/contentlayer.js'