Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Workflow of tools.simpleweb3

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages-deploy"
cancel-in-progress: false

jobs:
build:
name: Build React App
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run Tests
run: npm test

- name: Build Project
run: npm run build

- name: Upload Build Files
uses: actions/upload-pages-artifact@v3
with:
path: ./build

deploy:
Copy link
Owner

@tejareddy8888 tejareddy8888 Jul 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we deploying on to GitHub.

See this suggested code below:

  - name: Deploy to server
      uses: appleboy/ssh-action@v1.0.3
      with:
        host: ${{ secrets.SERVER_HOST }}
        port: ${{ secrets.SERVER_PORT }}
        username: ${{ secrets.SERVER_USER }}
        key: ${{ secrets.SERVER_SSH_KEY }}
        script: |
          # Navigate to your application directory
          cd /path/to/your/app
          
          # Pull latest changes
          git pull origin main
          
          # Install dependencies and build
          npm ci
          npm run build

name: Deploy to GitHub
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages

steps:
- name: Deploy Site to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4