47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Debug-Deploy-Workflow
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
deploy-job:
|
|
runs-on: windows
|
|
|
|
steps:
|
|
- name: 1. 检查代码检出
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 2. 打印环境信息
|
|
# 强制使用 powershell 并且设置编码为 UTF8
|
|
shell: powershell
|
|
run: |
|
|
$OutputEncoding = [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
chcp 65001
|
|
Write-Host "Current Directory: $PWD"
|
|
node -v
|
|
pnpm -v
|
|
Write-Host "Current Tag/Branch: ${{ github.ref_name }}"
|
|
|
|
- name: 3. 安装依赖
|
|
shell: powershell
|
|
run: |
|
|
$OutputEncoding = [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
chcp 65001
|
|
pnpm install --prefer-offline
|
|
|
|
- name: 4. 执行部署脚本
|
|
shell: powershell
|
|
run: |
|
|
$OutputEncoding = [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
chcp 65001
|
|
node deploy.js
|
|
env:
|
|
SENTRY_URL: ${{ secrets.GLITCHTIP_URL }}
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.GLITCHTIP_TOKEN }}
|
|
SENTRY_ORG: ${{ secrets.GLITCHTIP_ORG }}
|
|
SENTRY_PROJECT: ${{ secrets.GLITCHTIP_PROJECT }}
|