Skip to content

fix: #562 alteração do consentimento pro localStorage #673

fix: #562 alteração do consentimento pro localStorage

fix: #562 alteração do consentimento pro localStorage #673

Workflow file for this run

name: ci.uffs.cc
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
env:
BUILD_HOST: ci.uffs.cc
BUILD_WEB_DIRECTORY: /home/ccuffsci/ci.uffs.cc/practice-web-feedback
BUILD_WEB_URL: https://ci.uffs.cc/practice-web-feedback
jobs:
build-deploy:
name: Build and test Laravel app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup ENV Laravel Configuration for CI
run: |
php -r "file_exists('.env') || copy('.env.ci', '.env');"
echo 'DB_DATABASE=${{ github.workspace }}/database/database.sqlite' >> .env
- name: Install Dependencies (PHP vendors)
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Generate jwt
run: php artisan jwt:secret
- name: Create DB and schemas
run: |
mkdir -p database
touch database/database.sqlite
php artisan migrate
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Prepare deploy server
uses: appleboy/ssh-action@master
with:
host: ${{ env.BUILD_HOST }}
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_PASSWORD }}
script: |
mkdir -p ${{ env.BUILD_WEB_DIRECTORY }}/${{ steps.extract_branch.outputs.branch }}/${{ github.sha }}
- name: Clean vendor files
run: rm -rf vendor
- name: Deploy app via SSH
uses: garygrossgarten/github-action-scp@release
with:
local: ${{ github.workspace }}/
remote: ${{ env.BUILD_WEB_DIRECTORY }}/${{ steps.extract_branch.outputs.branch }}/${{ github.sha }}/
host: ${{ env.BUILD_HOST }}
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_PASSWORD }}
- name: Restore vendor folder on build server
uses: appleboy/ssh-action@master
with:
host: ${{ env.BUILD_HOST }}
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_PASSWORD }}
script: |
cd ${{ env.BUILD_WEB_DIRECTORY }}/${{ steps.extract_branch.outputs.branch }}/${{ github.sha }}
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
echo 'DB_DATABASE=${{ env.BUILD_WEB_DIRECTORY }}/${{ steps.extract_branch.outputs.branch }}/${{ github.sha }}/database/database.sqlite' >> .env
- name: Summary
run: |
echo "Summary:"
echo " Live URL: ${{ env.BUILD_WEB_URL }}/${{ steps.extract_branch.outputs.branch }}/${{ github.sha }}"