diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a9ccb55..24b869c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -11,17 +11,18 @@ jobs: - name: Checkout run: | git config --global --add safe.directory '*' - git clone --depth 1 "https://git.hoelee.com/hoelee/hoelee-blog.git" . + git clone --depth 1 "https://x-access-token:${GITHUB_TOKEN}@git.hoelee.com/hoelee/hoelee-blog.git" . + git checkout $GITHUB_SHA 2>/dev/null || true ls -la - - name: Node version - run: node --version && npm --version - - name: Install dependencies run: npm ci - name: Build run: npm run build - - name: List output - run: ls -la dist/ + - name: Deploy to nginx-hoelee-blog + run: | + rm -rf /mnt/user/docker/nginx-hoelee-blog/html/* + cp -r dist/* /mnt/user/docker/nginx-hoelee-blog/html/ + ls -la /mnt/user/docker/nginx-hoelee-blog/html/