Skip to content

✨ Add hover effect on blog miniatures #391

✨ Add hover effect on blog miniatures

✨ Add hover effect on blog miniatures #391

# Deploy a PR preview on Github Pages
name: Deploy preview
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-preview:
name: '🚧 Build & deploy 🚀'
runs-on: ubuntu-latest
timeout-minutes: 10
# Do not run on Draft PRs
if: "!github.event.pull_request || github.event.pull_request.draft == false"
environment:
name: staging
url: https://rix-fr.github.io/rix/pr/${{ github.event.number }}
steps:
- name: 'Checkout'
uses: actions/checkout@v2
# https://github.com/actions/setup-node
- name: 'Setup node'
uses: actions/setup-node@v2
with:
node-version: '16'
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: "memory_limit=-1"
php-version: "8.1"
- name: 'Cache resized images'
uses: actions/cache@v2
with:
path: public/resized
key: resized-images-${{ github.workflow }}-${{ secrets.CACHE_VERSION }}
- name: 'Determine composer cache directory'
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: 'Cache composer dependencies'
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ hashFiles('composer.lock') }}
- name: 'Cache NPM dependencies'
uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('package-lock.json') }}
- name: 'Install dependencies'
run: |
echo "::group::composer install"
composer install --no-progress --ansi
echo "::endgroup::"
echo "::group::npm install"
npm install --color=always --no-progress
echo "::endgroup::"
- name: 'Warmup'
run: |
echo "::group::warmup production env"
npx encore production --color
bin/console cache:clear --ansi
bin/console cache:warmup --ansi
echo "::endgroup::"
env:
APP_ENV: prod
WEBPACK_PUBLIC_PATH: /rix/pr/${{ github.event.number }}/build
- name: 'Build static site'
run: bin/console stenope:build --no-interaction -vv --ansi --ignore-content-not-found
env:
APP_ENV: prod
APP_FORCE_NO_INDEX: 1
APP_GITHUB_REF: ${{ github.head_ref }}
ROUTER_DEFAULT_URI: https://rix-fr.github.io/rix/pr/${{ github.event.number }}
# https://github.com/marketplace/actions/deploy-to-github-pages
- name: '🚀 Deploy'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
COMMIT_MESSAGE: |
[AUTO] Deploy PR #${{ github.event.number }}
for commit ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
TARGET_FOLDER: pr/${{ github.event.number }} # The folder where the action should deploy on the deployment branch.
CLEAN: true # Automatically remove deleted files from the deploy branch