Skip to content

Commit 649386f

Browse files
committed
setting up github pages 2
1 parent 20235d3 commit 649386f

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
22+
- name: Setup Yarn
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18'
26+
cache: 'yarn'
27+
cache-dependency-path: applications/dknet/frontend/yarn.lock
28+
29+
- name: Install dependencies
30+
run: |
31+
cd applications/dknet/frontend
32+
yarn install --frozen-lockfile
33+
34+
- name: Build
35+
run: |
36+
cd applications/dknet/frontend
37+
yarn build
38+
39+
- name: Deploy to GitHub Pages
40+
if: github.ref == 'refs/heads/main'
41+
run: |
42+
cd applications/dknet/frontend
43+
git config --global user.name 'github-actions[bot]'
44+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
45+
yarn deploy
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Deploy script for GitHub Pages
4+
echo "🚀 Starting deployment to GitHub Pages..."
5+
6+
# Navigate to the frontend directory
7+
cd applications/dknet/frontend
8+
9+
# Install dependencies
10+
echo "📦 Installing dependencies..."
11+
yarn install
12+
13+
# Build the project
14+
echo "🔨 Building the project..."
15+
yarn build
16+
17+
# Deploy to GitHub Pages
18+
echo "🌐 Deploying to GitHub Pages..."
19+
yarn deploy
20+
21+
echo "✅ Deployment completed! Your site should be available at https://metacell.github.io/dknet"

0 commit comments

Comments
 (0)