Skip to content

Commit

Permalink
feat: 1. Update workflow.
Browse files Browse the repository at this point in the history
      2. Add git commit hash
  • Loading branch information
zyronon committed Apr 20, 2024
1 parent a793cdd commit 7c75fa3
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 170 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,12 @@ jobs:

- name: Build
run: pnpm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
# Upload dist repository
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
deploy_key: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
Expand Down
2 changes: 2 additions & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/// <reference types="vite/client" />

declare const LATEST_COMMIT_HASH: string

declare global {
interface Navigator {
control: any
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"vite": "^5.1.7",
"vite-plugin-cdn-import": "0.3.5",
"vite-plugin-commonjs": "^0.10.1",
"vue-tsc": "^2.0.6"
"vue-tsc": "^2.0.6",
"git-last-commit": "^1.0.1"
},
"lint-staged": {
"*.{js,ts,vue,jsx,tsx}": [
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
</keep-alive>
</transition>
</router-view>
<!-- <BaseMask v-if="!isMobile" />-->
<!-- <div v-if="!isMobile" class="guide">-->
<!-- <Icon icon="mynaui:danger-triangle" />-->
<!-- <div class="txt">-->
<!-- <h2>切换至手机模式才可正常使用</h2>-->
<!-- <h3>1. 按 F12 调出控制台</h3>-->
<!-- <h3>2. 按 Ctrl+Shift+M,或点击下面图标</h3>-->
<!-- </div>-->
<!-- <img src="@/assets/img/guide.png" alt="" />-->
<!-- </div>-->
<BaseMask v-if="!isMobile" />
<div v-if="!isMobile" class="guide">
<Icon icon="mynaui:danger-triangle" />
<div class="txt">
<h2>切换至手机模式才可正常使用</h2>
<h3>1. 按 F12 调出控制台</h3>
<h3>2. 按 Ctrl+Shift+M,或点击下面图标</h3>
</div>
<img src="@/assets/img/guide.png" alt="" />
</div>
<Call />
</template>
<script setup lang="ts">
Expand Down
8 changes: 4 additions & 4 deletions src/pages/me/rightMenu/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@
</div>
</div>

<div class="version">抖音 version{{ store.version }}</div>
<div class="version">抖音 {{ gitLastCommitHash }}</div>
</div>
</div>
</template>
<script setup lang="ts">
import { useBaseStore } from '@/store/pinia'
import { ref } from 'vue'
const gitLastCommitHash = ref(LATEST_COMMIT_HASH)
defineOptions({
name: 'ChooseSchool'
})
const store = useBaseStore()
</script>

<style scoped lang="less">
Expand Down
Loading

0 comments on commit 7c75fa3

Please sign in to comment.