Skip to content

Commit 7edc4e0

Browse files
Update github workflow
1 parent 3bc2958 commit 7edc4e0

1 file changed

Lines changed: 28 additions & 25 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,51 @@
1-
name: Deploy Vite site 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:
6-
- master
7+
branches: ['master']
78

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
813
permissions:
914
contents: read
1015
pages: write
1116
id-token: write
1217

18+
# Allow one concurrent deployment
1319
concurrency:
14-
group: "pages"
20+
group: 'pages'
1521
cancel-in-progress: true
1622

1723
jobs:
18-
build:
24+
# Single deploy job since we're just deploying
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
1929
runs-on: ubuntu-latest
20-
2130
steps:
2231
- name: Checkout
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Node
26-
uses: actions/setup-node@v4
32+
uses: actions/checkout@v5
33+
- name: Set up Node
34+
uses: actions/setup-node@v6
2735
with:
28-
node-version: 20
29-
cache: npm
30-
36+
node-version: lts/*
37+
cache: 'npm'
3138
- name: Install dependencies
3239
run: npm ci
33-
3440
- name: Build
3541
run: npm run build
36-
37-
- name: Upload Pages artifact
38-
uses: actions/upload-pages-artifact@v3
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v5
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v4
3946
with:
40-
path: dist
41-
42-
deploy:
43-
needs: build
44-
runs-on: ubuntu-latest
45-
46-
steps:
47+
# Upload dist folder
48+
path: './dist'
4749
- name: Deploy to GitHub Pages
48-
uses: actions/deploy-pages@v4
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)