Skip to content

Instantly share code, notes, and snippets.

View ygerasimov's full-sized avatar

Yuriy Gerasimov ygerasimov

View GitHub Profile
@ygerasimov
ygerasimov / pull-request-production-vrt.yml
Last active February 26, 2024 15:18
pull-request-production-vrt.yml
name: Trigger deployment to Test on pull request to Production branch.
on:
pull_request:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Terminus
@ygerasimov
ygerasimov / deploy-production.yml
Last active February 26, 2024 15:14
deploy-production.yml
name: Deploy to prod after merge to production branch
on:
push:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@ygerasimov
ygerasimov / pull-request-production.yml
Last active February 26, 2024 15:13
pull-request-production.yml
name: Trigger deployment to Test on pull request to Production branch.
on:
pull_request:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Terminus
@ygerasimov
ygerasimov / deploy-dev.yml
Last active February 26, 2024 15:11
deploy-dev.yml
name: Deploy to Pantheon dev environment
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
services:
apache:
commands:
init:
# The Diffy CLI tool requires PHP. If the service image does not have PHP
# installed, do it here
#- apt-get update
#- apt-get install php-cli
# Download the Diffy CLI tool, and authenticate. The latest version can be
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
orbs:
node: circleci/node@5.0.2
version: 2.1
jobs:
@ygerasimov
ygerasimov / inherit.twig
Created February 7, 2023 15:03
Demonstrate twig inheritance.
{% include "@atoms/text/headings/_heading.twig" with {
"heading_level": 2,
"heading": label,
"heading_url": url,
"heading_link_attributes": {
'rel': 'bookmark'
},
} %}
<?php
use Diffy\Diffy;
use Diffy\Screenshot;
use Diffy\Diff;
// https://pantheon.io/docs/guides/quicksilver/variables
$pantheon_environment = $_ENV['environment'];
// Not sure how these are build for your site.
if (window.location.hash == '#language-switcher') {
jQuery('.language-select').click();
}
if (window.location.hash == '#second-slide') {
jQuery('#slick-slide-control01').click();
}
@ygerasimov
ygerasimov / runCheck.sh
Created April 21, 2020 13:46
Diffy bitbucket compare script
#!/usr/bin/env bash
echo "==================================================="
echo "========== Run diffy compare and Bitbucket check =="
echo "==================================================="
API_KEY="$1"
PROJECT_ID=1194
DIFFY_HOST="https://app.diffy.website"