Skip to content

also remove gitignore #4

also remove gitignore

also remove gitignore #4

Workflow file for this run

name: Build and Deploy to gh-pages
on:
push:
branches:
- main # Change this to your main branch name
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install Dependencies
run: npm install
- name: Build with Webpack
run: npm run build # Adjust this command based on your project
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Deploy to gh-pages
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
git checkout --orphan gh-pages
git rm -rf src
git rm -rf .gitignore
cp -r ${{ github.workspace }}/dist/. .
git add .
git commit -m "Deploy to gh-pages"
git push -f origin gh-pages