added .env simulation for github actions #3
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
name: Deploy static site to Cloudflare Pages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' # Or your PHP version | ||
extensions: mbstring, xml, dom, sqlite3 | ||
ini-values: post_max_size=256M, upload_max_filesize=256M | ||
- name: Install Composer dependencies | ||
run: composer install | ||
- name: Set APP_DEBUG to true for debugging | ||
run: echo "APP_DEBUG=true" >> .env | ||
run: echo "APP_ENV=production" >> .env | ||
Check failure on line 28 in .github/workflows/deploy.yml GitHub Actions / Deploy static site to Cloudflare PagesInvalid workflow file
|
||
run: echo "APP_URL=https://electrik.dev" >> .env | ||
- name: Build static files | ||
run: php artisan export | ||
- name: Deploy to Cloudflare Pages | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | ||
directory: dist |