-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.17 KB
/
deploy.yml
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 to GitHub Pages
# Trigger the workflow on push or pull request to the main branch
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x' # You can adjust this version as needed
# Step 3: Install dependencies (if you have a package.json for dev tools like linters)
# If no dependencies are required, this step can be removed.
- name: Install dependencies
run: npm install
# Step 4: Build the project (If applicable, if not using a build tool, remove this step)
- name: Build project
run: npm run build # You can remove this if you don't use any build steps
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist # This is where your index.html, CSS, and JS files should be