mirror of
https://github.com/solidtime-io/docs.git
synced 2026-05-07 20:32:27 +00:00
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
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 }}
|