Build and Deploy #125143
This file contains hidden or 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
| name: Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - source | |
| pull_request: | |
| branches: | |
| - source | |
| schedule: | |
| - cron: '*/10 * * * *' | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP 🔧 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.1 | |
| ini-values: opcache.enable_cli=1, opcache.jit=tracing | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - name: Cache dependencies | |
| uses: actions/cache@v2 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies 🔧 | |
| run: | | |
| composer self-update | |
| composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
| - name: TimeZone ⏰ | |
| run: | | |
| sudo timedatectl set-timezone UTC | |
| timedatectl | |
| - name: Artisan 🔮 | |
| env: | |
| APP_NAME: Titanson | |
| APP_ENV: production | |
| APP_KEY: base64:hh+C71dWj0tmdKkazohGJh5vxSGNkvN1H9o6IDwEyaA= | |
| APP_DEBUG: false | |
| APP_URL: https://titanson.github.io | |
| run: | | |
| php artisan config:cache | |
| php artisan rss:download | |
| php artisan rss:exchange | |
| php artisan rss:similar | |
| php artisan rss:page | |
| - name: Logs 📑️ | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: Logs | |
| path: storage/logs/ | |
| - name: Deploy 🚀 | |
| uses: JamesIves/github-pages-deploy-action@releases/v4 | |
| with: | |
| single-commit: true | |
| clean: true | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| branch: master | |
| folder: public |