Skip to content

Commit 58959c7

Browse files
committed
vite example
1 parent d0677be commit 58959c7

1 file changed

Lines changed: 35 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,51 @@
1-
name: Deploy to GitHub Pages
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
23

34
on:
5+
# Runs on pushes targeting the default branch
46
push:
5-
branches: [main]
7+
branches: ['main']
68

9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
713
permissions:
814
contents: read
915
pages: write
1016
id-token: write
1117

18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: 'pages'
21+
cancel-in-progress: true
22+
1223
jobs:
13-
build-and-deploy:
24+
# Single deploy job since we're just deploying
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
1429
runs-on: ubuntu-latest
1530
steps:
16-
- uses: actions/checkout@v4
17-
18-
- name: Use Node.js
19-
uses: actions/setup-node@v4
31+
- name: Checkout
32+
uses: actions/checkout@v5
33+
- name: Set up Node
34+
uses: actions/setup-node@v6
2035
with:
21-
node-version: '20'
22-
36+
node-version: lts/*
37+
cache: 'npm'
2338
- name: Install dependencies
2439
run: npm ci
25-
26-
- run: npm run build
27-
28-
- uses: actions/configure-pages@v4
29-
- uses: actions/upload-pages-artifact@v3
40+
- name: Build
41+
run: npm run build
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v5
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v4
3046
with:
31-
path: dist
32-
33-
- uses: actions/deploy-pages@v4
34-
47+
# Upload dist folder
48+
path: './dist'
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)