fix by codeSniffer #13
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: Deploy | |
on: | |
push: | |
branches: | |
- NDybnov/hw21 | |
env: | |
COMMENT: 'my-comment-env' | |
APP_VERSION: 'v01100600' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Copy .env | |
run: cd app && cp .env.example .env | |
- name: UpdateCopy env.APP_VERSION | |
run: echo 'APP_VERSION=${{ env.APP_VERSION }}' >> app/.env | |
- name: UpdateCopy env.COMMENT | |
run: echo 'COMMENT='$(git log -1 --format='%s') >> app/.env | |
- name: Has dotenv file | |
run: cd app && ls -a | |
- name: Build the Docker image | |
run: cd app && docker compose build | |
- name: Docker run and detach | |
run: cd app && docker compose up --detach | |
- name: Install Dependencies | |
run: cd app && docker compose exec deploy-php-cli composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: cd app && docker compose exec deploy-php-cli vendor/phpunit/phpunit/phpunit tests | |
- name: Test run vie Curl | |
run: cd app && docker compose exec deploy-php-cli curl 0.0.0.0:8000 | |
deployment: | |
needs: tests | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: http://5.35.98.239 | |
steps: | |
- name: deploy | |
run: | | |
echo '..deploy...' | |
echo ${{ env.APP_VERSION }} | |
echo ${{ env.COMMENT }} |