Skip to content

Build and Deploy

Build and Deploy #2852

# see https://github.com/marketplace/actions/deploy-to-github-pages
name: Build and Deploy
on:
push:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
# https://crontab.guru/every-12-hours
- cron: '0 */12 * * *'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- run: composer install --no-progress --ansi
- run: bin/console import --ansi
- run: bin/console stenope:build -e prod
# see https://github.com/JamesIves/github-pages-deploy-action
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
folder: build
- name: Purge Cloudflare cache
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}