Skip to content

Commit 03c8cee

Browse files
committed
feat: Adiciona GitHub Action para deploy
1 parent 1af6fba commit 03c8cee

File tree

1 file changed

+17
-38
lines changed

1 file changed

+17
-38
lines changed

.github/workflows/deploy.yml

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,32 @@
11
# Deploy CyberVault para GitHub Pages
22
# Desenvolvido por Matheus Fernandes
3-
name: Deploy para GitHub Pages
3+
name: Deploy to GitHub Pages
44

55
on:
66
push:
7-
branches: [ "main" ]
8-
workflow_dispatch:
9-
10-
permissions:
11-
contents: read
12-
pages: write
13-
id-token: write
14-
15-
concurrency:
16-
group: "pages"
17-
cancel-in-progress: false
7+
branches:
8+
- main # Altere para o nome da sua branch principal, se for diferente
189

1910
jobs:
2011
deploy:
21-
environment:
22-
name: github-pages
23-
url: ${{ steps.deployment.outputs.page_url }}
2412
runs-on: ubuntu-latest
2513
steps:
26-
- name: Checkout
14+
- name: Checkout Code
2715
uses: actions/checkout@v4
28-
29-
- name: Setup Node.js
16+
17+
- name: Set up Node.js
3018
uses: actions/setup-node@v4
3119
with:
32-
node-version: '20'
33-
cache: 'npm'
34-
35-
- name: Instalar dependências
36-
run: npm ci
37-
38-
- name: Build da aplicação
20+
node-version: 18
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Build project
3926
run: npm run build
40-
env:
41-
NODE_ENV: production
42-
43-
- name: Setup Pages
44-
uses: actions/configure-pages@v4
45-
46-
- name: Upload artifacts
47-
uses: actions/upload-pages-artifact@v3
48-
with:
49-
path: './dist'
50-
27+
5128
- name: Deploy to GitHub Pages
52-
id: deployment
53-
uses: actions/deploy-pages@v4
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./dist # Aqui você especifica a pasta que será publicada

0 commit comments

Comments
 (0)