chore: gitea changes
All checks were successful
Deploy / lint-build-deploy (push) Successful in 2m28s
All checks were successful
Deploy / lint-build-deploy (push) Successful in 2m28s
This commit is contained in:
46
.gitea/workflows/deploy.yml
Normal file
46
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
lint-build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
if [ -f package-lock.json ]; then
|
||||
npm ci
|
||||
else
|
||||
npm install
|
||||
fi
|
||||
|
||||
- name: Run linting
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to VPS
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H 51.210.247.57 >> ~/.ssh/known_hosts
|
||||
ssh debian@51.210.247.57 << 'EOF'
|
||||
cd /home/debian/siri-shortcuts
|
||||
git pull origin main
|
||||
cd /home/debian/infrastructure
|
||||
docker-compose up -d --build siri-shortcuts
|
||||
EOF
|
||||
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "start"]
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Metadata } from 'next';
|
||||
import Script from 'next/script';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -10,6 +11,11 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang='en'>
|
||||
<body>{children}</body>
|
||||
<Script
|
||||
defer
|
||||
src='https://analytics.frompixels.com/script.js'
|
||||
data-website-id='af4f32d9-d524-44cc-ae9b-c88a0beec398'
|
||||
/>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,10 @@
|
||||
"@babel/helpers": ">=7.26.10",
|
||||
"brace-expansion": ">=1.1.12"
|
||||
},
|
||||
"overrides": {
|
||||
"brace-expansion": "1.1.11",
|
||||
"minimatch": "3.1.2"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx}": [
|
||||
"eslint --quiet --fix"
|
||||
|
||||
Reference in New Issue
Block a user