cp .env.sail.example .env
Then setup your local env, and do following commands :
composer install
sail up -d
sail artisan key:generate
sail artisan migrate
sail npm i
Start sail
sail up -d
And run vite in dev mode
sail npm run dev
The following setup is for a staging environment, you can adapt it by modifying .github/workflows
files too.
By default, CI workflow will start for every commit on develop
branch.
It will build js/css bundle with a github action and push it to the release/staging
branch.
Then, the deployment script, called by the webook, will pull on this branch.
STAGING_WEBHOOK_SECRET
and put a personalized token. It should be the same that your env variable WEBHOOK_SECRET
in .env
fileSTAGING_WEBHOOK_URL
and put your website url with https scheme, and without trailing slash (ex: https://example.com
)Then, you should authorize github actions to push to your repo :
On your server, you will need git and composer. Clone your repository, cd into and
cp .env.example .env
Then setup your env, and do following commands :
composer install
php artisan key:generate
php artisan migrate