Skip to content

Commit 33666c9

Browse files
committed
Merge remote-tracking branch 'origin/ci-docker'
merge ci-docker
2 parents 5141ab1 + 66beafd commit 33666c9

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Server and Push to Docker Hub
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build-and-push:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Set up Docker Buildx
13+
uses: docker/setup-buildx-action@v2
14+
with:
15+
version: v0.9.1
16+
driver-opts: |
17+
image=moby/buildkit:v0.10.6
18+
- name: Login to DockerHub
19+
uses: docker/login-action@v2
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
- name: Build and Push Image
24+
uses: docker/build-push-action@v3.2.0
25+
with:
26+
context: ./
27+
file: ./Dockerfile
28+
push: true
29+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/algo-bootstrap-website:latest

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM algoux/nodebase:16
2+
3+
WORKDIR /app/
4+
5+
COPY . .
6+
RUN npm install -g pnpm@8
7+
RUN pnpm i --frozen-lockfile && npm run build
8+
9+
ENV PATH="/app/node_modules/pm2/bin:${PATH}"
10+
CMD npm run deploy:foreground

0 commit comments

Comments
 (0)