Skip to content

added .env simulation for github actions #3

added .env simulation for github actions

added .env simulation for github actions #3

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Deploy static site to Cloudflare Pages

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 28, Col: 9): 'run' is already defined .github/workflows/deploy.yml (Line: 29, Col: 9): 'run' is already defined
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