Merge pull request #78 from aw-studio/fix/reference-download #168
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: build | |
on: | |
push: | |
branches: | |
- 'main' | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.0 | |
tools: composer:v2 | |
coverage: none | |
- name: Install dependencies | |
run: | | |
composer config http-basic.store.litstack.io ${{ secrets.LITSTACK_USERNAME }} ${{ secrets.LITSTACK_PASSWORD }} | |
composer install --ignore-platform-reqs && npm install --non-interactive | |
- name: Make production build | |
run: npm run production | |
- name: Commit production build | |
uses: EndBug/add-and-commit@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
add: "." | |
author_name: ${{ github.event.pusher.name }} | |
author_email: ${{ github.event.pusher.email }} | |
message: "Apply production build from CI | |
Co-authored-by: aw-ci-bot <[email protected]>" | |
deploy_staging: | |
needs: build | |
runs-on: ubuntu-latest | |
name: Deploy Staging | |
steps: | |
- name: Request staging deployment | |
run: curl -X POST ${{ secrets.STAGING_DEPLOYMENT_TRIGGER_URL }} | |
deploy_production: | |
if: ${{ github.event_name == 'release' }} | |
needs: build | |
runs-on: ubuntu-latest | |
name: Deploy production | |
steps: | |
- name: Request production deployment | |
run: curl -X POST ${{ secrets.PRODUCTION_DEPLOYMENT_TRIGGER_URL }} |