Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
salmanfarisvp authored Dec 3, 2024
1 parent a56837d commit d467133
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,34 @@ name: Deploy GitHub Pages
on:
push:
branches:
- main
- main # Trigger the workflow on pushes to the 'main' branch

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-latest # Use the latest Ubuntu runner

steps:
- uses: actions/checkout@v4
# Install dependencies and build your website if needed
# - run: npm install
# - run: npm run build
# Add custom domain information to ensure it's not removed
- 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: npm run build # Build the app for production

- name: Set up custom domain
run: |
echo 'tinymlhack.com' > ./public/CNAME
# Deploy to GitHub Pages
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
uses: peaceiris/actions-gh-pages@v4 # Deploy to GitHub Pages
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
github_token: ${{ secrets.GITHUB_TOKEN }} # Use the GitHub token for authentication
publish_dir: ./build # Publish the 'build' directory for deployment

0 comments on commit d467133

Please sign in to comment.