Compare commits
No commits in common. "41674ea6a175c8917f8e793506638a81ee50d606" and "78d733ace6d723744d2400374883fe092207eaaf" have entirely different histories.
41674ea6a1
...
78d733ace6
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,9 +1,6 @@
|
|||
node_modules
|
||||
postgres
|
||||
|
||||
key
|
||||
key.pub
|
||||
|
||||
# Output
|
||||
.output
|
||||
.vercel
|
||||
|
|
1
articles
Submodule
1
articles
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1af78edd4c4e4e5b3834303e19f3507998019825
|
|
@ -15,13 +15,11 @@ RUN npm run build
|
|||
# For Run
|
||||
FROM node:22-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./key ./key
|
||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* && \
|
||||
mkdir -p ~/.ssh && \
|
||||
ssh-keyscan -t rsa gitea.hareworks.net >> ~/.ssh/known_hosts && \
|
||||
git -c core.sshCommand="ssh -i ./key -F /dev/null" clone git@gitea.hareworks.net:Hare/blog-articles.git articles
|
||||
COPY ./articles ./articles
|
||||
|
||||
COPY --from=builder /app/build ./build
|
||||
COPY --from=builder /app/package.json .
|
||||
|
|
|
@ -7,7 +7,7 @@ import { execSync } from 'child_process';
|
|||
export default async function init(db: Postgres) {
|
||||
if (fs.existsSync('./articles/')) {
|
||||
console.log('Pulling articles from git..');
|
||||
const stdout = execSync('git -c core.sshCommand="ssh -i ../key -F /dev/null" pull', { cwd: './articles/' });
|
||||
const stdout = execSync('git pull', { cwd: './articles/' });
|
||||
console.log(stdout.toString());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user