Build and Deploy #2473
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@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
- run: composer install --no-progress --ansi | |
# configure timezone: https://stackoverflow.com/a/27052708/1348344 | |
#- run: export TZ=Europe/Prague | |
- 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: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: build | |
CLEAN: true | |
- name: Purge cache | |
uses: jakejarvis/cloudflare-purge-action@master | |
env: | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} |