Skip to content

Commit 0d7a4f0

Browse files
authored
Create main.yml
1 parent 13d0e3b commit 0d7a4f0

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Thanks to the Vite wiki (i hate YAMLs): https://vite.dev/guide/static-deploy
2+
3+
# Simple workflow for deploying static content to GitHub Pages
4+
name: Deploy static content to Pages
5+
6+
on:
7+
# Runs on pushes targeting the default branch
8+
push:
9+
branches: ['main']
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow one concurrent deployment
21+
concurrency:
22+
group: 'pages'
23+
cancel-in-progress: true
24+
25+
jobs:
26+
# Single deploy job since we're just deploying
27+
deploy:
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v5
35+
- name: Set up Node
36+
uses: actions/setup-node@v6
37+
with:
38+
node-version: lts/*
39+
cache: 'npm'
40+
- name: Install dependencies
41+
run: npm ci
42+
- name: Build
43+
run: npm run build
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v5
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v4
48+
with:
49+
# Upload dist folder
50+
path: './dist'
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)