-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (30 loc) · 1.16 KB
/
deploy.yml
File metadata and controls
38 lines (30 loc) · 1.16 KB
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
name: Deploy GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest # Use the latest Ubuntu runner
steps:
- name: Checkout repository
uses: actions/checkout@v4 # Checkout the code in the repository
- name: Set up Node.js
uses: actions/setup-node@v3 # Set up Node.js
with:
node-version: '16' # Specify the version of Node.js you want to use
- name: Install dependencies
run: npm install # Install project dependencies
- name: Build the React app
run: |
CI=false npm run build # Disable CI for the build step
env:
CI: false # Explicitly set CI to false (optional redundancy)
- name: Set up custom domain
run: |
echo 'tinymlhack.com' > ./build/CNAME # Ensure the custom domain is included in the build folder
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4 # Deploy to GitHub Pages
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Use the GitHub token for authentication
publish_dir: ./build # Publish the 'build' directory for deployment