mirror of
https://github.com/ConjureETS/Site.git
synced 2026-03-24 01:30:58 +00:00
fix Docker build
This commit is contained in:
parent
6199181c98
commit
c49ee70e15
13
.dockerignore
Normal file
13
.dockerignore
Normal file
@ -0,0 +1,13 @@
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
.git
|
||||
.gitignore
|
||||
.DS_Store
|
||||
.astro/
|
||||
dist/
|
||||
.idea/
|
||||
.vscode/
|
||||
.github/
|
||||
.env.local
|
||||
.env.*.local
|
||||
*.log
|
||||
21
.github/workflows/static.yml
vendored
21
.github/workflows/static.yml
vendored
@ -22,8 +22,8 @@ concurrency:
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Single deploy job since we're just deploying
|
||||
deploy:
|
||||
# Build and deploy job
|
||||
build-and-deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
@ -31,13 +31,26 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build with Astro
|
||||
run: npm run build
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: 'public'
|
||||
path: 'dist'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
16
Dockerfile
16
Dockerfile
@ -1,6 +1,18 @@
|
||||
FROM nginx:alpine
|
||||
# Build stage
|
||||
FROM node:20-slim AS builder
|
||||
|
||||
COPY public/ /usr/share/nginx/html/
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
FROM nginx:latest
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user