Compare commits
3 Commits
main
...
46d9b8df94
| Author | SHA1 | Date | |
|---|---|---|---|
| 46d9b8df94 | |||
| 7912f59fb8 | |||
| 90771b85e9 |
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -17,9 +17,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bun run build
|
run: |
|
||||||
- name: Write git hash into dist
|
bun run build
|
||||||
run: echo "export const GIT_HASH = '$(git rev-parse HEAD)';" > dist/git-hash.js
|
echo "export const GITHUB_SHA = '$GITHUB_SHA';" > dist/git-hash.js
|
||||||
- name: Create Build Artifact
|
- name: Create Build Artifact
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
FROM oven/bun as builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . .
|
|
||||||
RUN bun install
|
|
||||||
RUN bun run build
|
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY ./dist /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
@@ -16,7 +16,7 @@ http {
|
|||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html /git-hash.js;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||||
|
|||||||
Reference in New Issue
Block a user