on: push: branches: - main - develop name: Deploy jobs: build: runs-on: ubuntu-latest steps: - name: "Check out code" uses: actions/checkout@v4 - name: "Setup node" uses: actions/setup-node@v4 with: node-version: 18 - name: "Install npm dependencies" run: npm ci - name: "Build static site" run: npm run build - name: "Setup PHP with PECL extension" uses: shivammathur/setup-php@v2 with: php-version: '8.3' extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, soap, intl, gd, exif - name: "Download Fastfront CLI" run: curl https://fastfront-cli.s3.fr-par.scw.cloud/fastfront-cli.phar -o fastfront-cli.phar - name: "Deploy with Fastfront" run: php fastfront-cli.phar deploy $FASTFRONT_STAGE ./build env: FASTFRONT_STAGE: ${{ github.ref == 'refs/heads/main' && '9beab6f6-7239-4451-8115-ff7520480549' || '9d40e799-ca33-470a-b10e-ed6bde30221c' }} FASTFRONT_API_KEY: ${{ github.ref == 'refs/heads/main' && secrets.FASTFRONT_PROD_API_KEY || secrets.FASTFRONT_STAGING_API_KEY }}