fix... #59
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: Guru Man | |
on: | |
push: | |
branches: | |
- production | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
extensions: mbstring, intl, pdo_mysql | |
key: cache-v1 | |
jobs: | |
composer: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Show locals | |
run: pwd && ls -la && ls .github/actions/common-steps/ -la && more /home/runner/work/guruman/guruman/.github/actions/common-steps/action.yml | |
- name: Run common steps | |
uses: ./.github/actions/common-steps | |
with: | |
php-version: "8.4" | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | |
lint: | |
needs: composer | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Run common steps | |
uses: ./.github/actions/common-steps | |
with: | |
php-version: "8.4" | |
- name: Php lint | |
run: composer lint-ci | |
test: | |
needs: composer | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Run common steps | |
uses: ./.github/actions/common-steps | |
with: | |
php-version: "8.4" | |
- name: Php Pest | |
run: composer test-ci | |
build: | |
needs: [test, lint] | |
runs-on: [self-hosted, production] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Copy code to /var/www/guruman | |
run: | | |
sudo cp -R . /var/www/guruman | |
- name: Change permisions and ownership | |
run: | | |
sudo chown -R www-data:www-data /var/www/guruman && sudo chmod -R 755 /var/www/guruman | |
- name: restart nginx | |
run: | | |
sudo service php8.4-fpm restart && sudo service nginx restart |