-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1017 Bytes
/
deploy.yml
File metadata and controls
41 lines (32 loc) · 1017 Bytes
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
37
38
39
40
41
name: Deploy Vite site to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write # 👈 necessario per il push automatico su gh-pages
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build
env:
VITE_TURNSTILE_SITE_KEY: ${{ secrets.VITE_TURNSTILE_SITE_KEY }}
run: npm run build
- name: Copy Cloudflare Functions to dist
run: cp -r functions client/dist/functions
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: client/dist
force_orphan: true # crea il branch gh-pages se non esiste
cname: primebuild.website # 👈 crea anche il file CNAME