Build and Deploy #3248
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/[email protected] | |
with: | |
folder: build | |
- name: Purge Cloudflare cache | |
uses: jakejarvis/cloudflare-purge-action@master | |
env: | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} |