-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b42eb2
commit b3b2304
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Front-end | Deploy | ||
|
||
on: | ||
# Executa em pushes direcionados ao branch main | ||
push: | ||
branches: ["main"] | ||
# Permite que você execute este fluxo de trabalho manualmente na guia Ações fluxo de trabalho_dispatch: | ||
workflow_dispatch: | ||
|
||
# Define permissões do GITHUB_TOKEN para permitir a implantação nas páginas do GitHub | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Permitir apenas uma implantação simultânea, ignorando as execuções na fila entre a execução em andamento e a última na fila. | ||
# No entanto, NÃO cancele execuções em andamento, pois queremos permitir que essas implantações de produção sejam concluídas. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
frontend: | ||
# Define o sistema operacional em que o trabalho será executado | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
# Acessar o repositório | ||
- uses: actions/checkout@v4 | ||
# Instalar e usar a versão 20.9.0 do Node.js | ||
- name: Use Node.js 20.9.0 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.9.0 | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
working-directory: frontend | ||
|
||
- name: Build | ||
run: npm run build --if-present | ||
working-directory: frontend | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Carregar repositório inteiro | ||
path: "./frontend/dist" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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