-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 1.19 KB
/
pages.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
37
38
39
40
41
name: Build using vite and deploy to GitHub Pages when on main
on:
- push
# Configures premissions for the used GitHub Token that are required for Pages.
permissions:
contents: read # To get the source
pages: write # To deploy to pages
id-token: write # To verify deployment (done automatically by the official action)
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Setup GitHub Pages
if: github.ref == 'refs/heads/main'
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
path: "./dist/"
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: actions/deploy-pages@v2