ci/cd
Some checks failed
Deploy / build (push) Failing after 8s

This commit is contained in:
Никита Круглицкий 2025-09-26 00:43:46 +06:00
parent 3121e9aaee
commit a0f41b5c91
3 changed files with 26 additions and 6 deletions

View File

@ -6,23 +6,32 @@ on:
- master - master
jobs: jobs:
build-and-deploy: build:
runs-on: node-22 runs-on: node-22
steps: steps:
- name: ssh-keyscan - name: Keyscan
run: | run: |
mkdir ~/.ssh mkdir ~/.ssh
ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts
- name: Checkout code - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-strict: false ssh-strict: false
persist-credentials: false persist-credentials: false
- name: Install dependencies - name: Build
run: docker build -t paxton:latest .
- name: Run
run: | run: |
yarn install docker run -d \
yarn build --name paxton \
--label "traefik.enable=true" \
--label "traefik.http.routers.paxton.rule=Host(`paxton.koptilnya.xyz`)" \
--label "traefik.http.routers.paxton.entrypoints=websecure" \
--label "traefik.http.routers.paxton.tls.certresolver=myresolver" \
--label "traefik.http.services.paxton.loadbalancer.server.port=80" \
paxton:latest

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM node:22
WORKDIR /app
COPY package.json ./
COPY yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html

View File

@ -1,5 +1,6 @@
// https://nuxt.com/docs/api/configuration/nuxt-config // https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({ export default defineNuxtConfig({
ssr: false,
compatibilityDate: '2025-05-15', compatibilityDate: '2025-05-15',
devtools: { enabled: true }, devtools: { enabled: true },
modules: ['@nuxt/ui', '@nuxt/image', '@nuxt/icon', '@nuxt/fonts', '@nuxtjs/i18n'], modules: ['@nuxt/ui', '@nuxt/image', '@nuxt/icon', '@nuxt/fonts', '@nuxtjs/i18n'],