Skip to content

Commit

Permalink
#15 prepare for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sinatayebati committed May 20, 2024
1 parent 0c63ffa commit b23e0ea
Show file tree
Hide file tree
Showing 5 changed files with 761 additions and 17 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm install --legacy-peer-deps

- name: Build the app
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ RUN npm install --legacy-peer-deps
# Copy the rest of the application
COPY . .

# Build the application
RUN npm run build

# Install a lightweight HTTP server
RUN npm install -g serve

# Expose the port the app runs on
EXPOSE 5173

# Command to run the app
CMD ["npm", "run", "dev"]
CMD ["serve", "-s", "dist", "-l", "5173"]
Loading

0 comments on commit b23e0ea

Please sign in to comment.