Skip to content

Instantly share code, notes, and snippets.

View RyanRoberts's full-sized avatar
💭
I may be slow to respond.

Ryan RyanRoberts

💭
I may be slow to respond.
View GitHub Profile
@RyanRoberts
RyanRoberts / dateTimeMacro.twig
Created July 2, 2021 10:31 — forked from watershed/dateTimeMacro.twig
CraftCMS datetime macro
{#
value : date and/or time value validated as not null (mandatory),
format : php date format string (mandatory),
options: {
prefix: string to append to processed format,
suffix: string to append to processed format,
tag : html tagname string,
html : markup, typically to be wrapped in a <time> element,
attr : hash of name:value attribute pairs
}
@RyanRoberts
RyanRoberts / deploy.yaml
Created December 27, 2021 19:53 — forked from jeromecoupe/deploy.yaml
Github actions: build and deploy Craft sites (WIP)
name: Craft CMS deployments
on:
push:
branches: [master]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
@RyanRoberts
RyanRoberts / deploy-from-git.sh
Created September 5, 2022 08:40 — forked from johnfmorton/deploy-from-git.sh
deploy-from-git.sh - Used on Arcustech to deploy a Craft CMS site
# This script is used to deploy a Craft CMS site on an Arcustech server
#
# It will clone the git main branch from a private repo into
# a 'deployments' directory and them create symlinks for the
# static assets: .env, and 3 directories of assets.
# It then does a composer install of the Craft site.
# The scripts in the composer file are like this: https://github.com/nystudio107/devmode/blob/f2b231e772026860f75e255c9e22722dac983de8/cms/composer.json#L55
# These scripts update Craft, clear caches, etc.
# Finally, it will symlink the web directory in the newly downloaded files
# to the public folder which is the one used by Arcustech