Skip to content

fix: 禁用ssr时links页面404🥵 #19

fix: 禁用ssr时links页面404🥵

fix: 禁用ssr时links页面404🥵 #19

Workflow file for this run

name: "deploy"
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run generate
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Deploy to Server
uses: appleboy/scp-action@v0.1.7
with:
host: ${{secrets.HOST}}
username: ${{secrets.USERNAME}}
password: ${{secrets.PASSWORD}}
rm: true
source: dist/*
target: ${{secrets.TARGET}}
strip_components: 1
- name: Directory compression
run: |
tar -zcvf dist.tar.gz dist
- name: Release
uses: softprops/action-gh-release@v2
with:
files: dist.tar.gz