Skip to content

Merge pull request #60 from PHPRio/dependabot/npm_and_yarn/braces-3.0.3 #12

Merge pull request #60 from PHPRio/dependabot/npm_and_yarn/braces-3.0.3

Merge pull request #60 from PHPRio/dependabot/npm_and_yarn/braces-3.0.3 #12

Workflow file for this run

name: Deploy
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Clona o repositório.
# Veja https://github.com/actions/checkout
- uses: actions/checkout@v2
# Instala PHP e Composer.
# Veja https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.x
tools: composer:v2
# Valida o arquivo composer.json.
- name: Validate composer.json and composer.lock
run: composer validate --strict
# Armazena as dependências em cache para que não seja necessário
# fazer o download a cada run.
# Veja https://github.com/actions/cache
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
# Instala as dependências.
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Faz o build do site na pasta temporária output_prod.
- name: Generate static files
run: composer run prod
# Commita os arquivos gerados no passo anterior na branch gh-pages.
# Veja https://github.com/peaceiris/actions-gh-pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output_prod