Skip to content

Commit

Permalink
Merge branch 'release/1.4.5' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 14, 2024
2 parents 9f7376d + 6feee8a commit e9c0b1c
Show file tree
Hide file tree
Showing 10 changed files with 2,967 additions and 1,586 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and Deploy Docs
env:
DOCS_DEST_DIR: /recipe/
DOCS_DEST_DIR: /recipe/v1/
on:
push:
branches:
Expand All @@ -22,11 +22,11 @@ jobs:
strategy:
fail-fast: true
matrix:
node-version: [14.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -35,7 +35,7 @@ jobs:
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --delete
switches: -avzr
path: ./dist/
remote_path: ${{ secrets.NYS_DOCS_ROOT }}${{ env.DOCS_DEST_DIR }}
remote_host: ${{ secrets.NYS_DEPLOY_REMOTE_HOST }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create Release
run-name: Create release for ${{ github.event.client_payload.version }}

on:
repository_dispatch:
types:
- craftcms/new-release

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: ncipollo/release-action@v1
with:
body: ${{ github.event.client_payload.notes }}
makeLatest: ${{ github.event.client_payload.latest }}
name: ${{ github.event.client_payload.version }}
prerelease: ${{ github.event.client_payload.prerelease }}
tag: ${{ github.event.client_payload.tag }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Recipe Changelog

## 1.4.5 - 2024.01.14
### Added
* Automate release generation via GitHub action

### Changed
* Updated docs to use node 20 & a new sitemap plugin

## 1.4.4 - 2023.02.23
### Fixed
* Fixed an issue where the Nutritional Information display didn't take into account the number of servings ([#66](https://github.com/nystudio107/craft-recipe/issues/66))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-recipe",
"description": "A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support",
"type": "craft-plugin",
"version": "1.4.4",
"version": "1.4.5",
"keywords": [
"craft",
"cms",
Expand Down
4 changes: 2 additions & 2 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG TAG=14-alpine
ARG TAG=20-alpine
FROM node:$TAG

USER node
RUN npm install -g npm@^10.0.0

WORKDIR /app/

Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MAJOR_VERSION?=1
TAG?=14-alpine
TAG?=20-alpine
CONTAINER?=$(shell basename $(dir $(CURDIR)))-v${MAJOR_VERSION}-docs
DOCS_DEV_PORT?=400${MAJOR_VERSION}
DOCS_DEST?=../../../sites/nystudio107/web/docs/recipe
DOCS_DEST?=../../../sites/nystudio107/web/docs/recipe/v1
IMAGE_INFO=$(shell docker image inspect $(CONTAINER):$(TAG))
IMAGE_NAME=${CONTAINER}:${TAG}
DOCKER_RUN=docker container run --rm -it -v "${CURDIR}":/app
Expand Down
8 changes: 7 additions & 1 deletion docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defineConfig} from 'vitepress';
export default defineConfig({
title: 'Recipe Plugin',
description: 'Documentation for the Recipe plugin',
base: '/docs/recipe/',
base: '/docs/recipe/v1/',
lang: 'en-US',
head: [
['meta', {content: 'https://github.com/nystudio107', property: 'og:see_also',}],
Expand Down Expand Up @@ -33,6 +33,12 @@ export default defineConfig({
{text: 'Store', link: 'https://plugins.craftcms.com/recipe'},
{text: 'Changelog', link: 'https://nystudio107.com/plugins/recipe/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-recipe/issues'},
{
text: 'v1', items: [
{text: 'v4', link: 'https://nystudio107.com/docs/recipe/'},
{text: 'v1', link: '/'},
],
},
]
},
});
20 changes: 10 additions & 10 deletions docs/docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import {defineConfig} from 'vite';
import SitemapPlugin from 'rollup-plugin-sitemap';
import VitePressConfig from './.vitepress/config';
import {defineConfig} from 'vite'
import { sitemap, Url as SitemapUrl } from '@aminnairi/rollup-plugin-sitemap'
import VitePressConfig from './.vitepress/config'
import {DefaultTheme} from "vitepress/types/default-theme";

const docsSiteBaseUrl = 'https://nystudio107.com';
const docsSiteBaseUrl = 'https://nystudio107.com'
const docsBaseUrl = new URL(VitePressConfig.base!, docsSiteBaseUrl).href.replace(/\/$/, '') + '/';
const siteMapRoutes = [{
path: '',
name: VitePressConfig.title
let siteMapUrls: SitemapUrl[] = [{
location: '',
lastModified: new Date(),
}];

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
SitemapPlugin({
sitemap({
baseUrl: docsBaseUrl,
contentBase: './docs/.vitepress/dist',
routes: siteMapRoutes,
urls: siteMapUrls,
})
],
server: {
Expand Down
Loading

0 comments on commit e9c0b1c

Please sign in to comment.