-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 974 Bytes
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy to GitHub Pages
on:
push:
branches:
- main # Adjust this if you want to deploy from a different branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20' # Adjust this based on your project's Node version
- name: Install and Build
run: |
npm install
npm run build
# Carica i file build come un artifact
- uses: actions/upload-artifact@v2
with:
name: site-build
path: build/
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages # The branch the action should deploy to
folder: build # The folder the action should deploy
token: ${{ secrets.GITHUB_TOKEN }} # Using the built-in GitHub Token
clean: true
force: true