Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LxHTT committed Jan 2, 2024
1 parent c60bf20 commit 711bdbf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ jobs:
uses: szenius/[email protected]
with:
timezoneLinux: 'Asia/Shanghai'

- name: Get Time
run: |
echo "TAG_TIME=$(date +"%y%m%d-%H%M")" >> $GITHUB_ENV

- name: Check out Git Repository
uses: actions/checkout@v3

Expand All @@ -40,13 +36,13 @@ jobs:
run: yarn run docs:build

- name: Compress Release Assets
run: 7z a -r ${{ env.TAG_TIME }}.zip ./docs/.vitepress/dist/*
run: 7z a -r MCSLWebsite.zip ./docs/.vitepress/dist/*

- name: Release
uses: softprops/action-gh-release@v1
with:
body: "update."
prerelease: false
draft: false
tag_name: ${{ env.TAG_TIME }}
files: ${{ env.TAG_TIME }}.zip
tag_name: Latest
files: MCSLWebsite.zip
7 changes: 6 additions & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { defineConfig } from 'vitepress'
import timeline from "vitepress-markdown-timeline";
import { qqSvg } from "./icon.mjs"
import { qqSvg } from "./icon.mjs";
import { loadClarityTag } from './msClarity.mjs';


// https://vitepress.dev/reference/site-config
export default defineConfig({

lang: "zh-CN",
title: 'MCServerLauncher 2',
description: '一个简洁、全能的Minecraft开服器',
Expand All @@ -17,6 +19,9 @@ export default defineConfig({
sitemap: {
hostname: 'https://mcsl.com.cn'
},
enhanceApp({ app }) {
loadClarityTag();
},
vite: {
server: {
proxy: {
Expand Down
12 changes: 12 additions & 0 deletions docs/.vitepress/msClarity.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export function loadClarityTag() {
(window.clarity = window.clarity || function () {
(window.clarity.q = window.clarity.q || []).push(arguments);
});

const script = document.createElement("script");
script.async = true;
script.src = "https://www.clarity.ms/tag/kfjp1s3qg3";

const firstScript = document.getElementsByTagName("script")[0];
firstScript.parentNode.insertBefore(script, firstScript);
}

0 comments on commit 711bdbf

Please sign in to comment.