Update static.yml #45
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: Vite build and deploy | |
on: | |
push: | |
branches: | |
- android # A branch onde o deploy será feito | |
pull_request: | |
branches: | |
- android # Quando um PR for feito na branch android | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Setup Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Ou a versão do Node.js que seu projeto usa | |
# Instalar as dependências | |
- name: Install dependencies | |
run: npm install | |
# Gerar build com Vite | |
- name: Build project with Vite | |
run: npm run build | |
# Fazer deploy no GitHub Pages (se você estiver usando GitHub Pages) | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # A branch para onde o site será enviado | |
folder: build # A pasta gerada pelo Vite para deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Garantir que o token de acesso está configurado | |