Skip to content

Commit

Permalink
feat: 🚀 github自动化部署,预览地址
Browse files Browse the repository at this point in the history
  • Loading branch information
17359898647 committed Sep 15, 2023
1 parent befed91 commit 332fb80
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
},
plugins: ['vue', '@typescript-eslint'],
rules: {
'yml/no-empty-mapping-value': 'off',
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'linebreak-style': ['error', 'unix'],
'vue/multi-word-component-names': 'off',
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI Github Pages
on:
# 监听push操作
push:
branches:
- master # 这里只配置了main分支,所以只有推送main分支才会触发以下任务
workflow_dispatch:
jobs:
# 任务ID
build-and-deploy:
# 运行环境
runs-on: ubuntu-latest
# 步骤
steps:
# 官方action,将代码拉取到虚拟机
- name: Checkout ️
uses: actions/checkout@v3

- name: Install and Build # 安装依赖、打包,如果提前已打包好无需这一步
run: |
npm install
npm run build
- name: Deploy # 部署
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # 部署后提交到那个分支
folder: dist # 这里填打包好的目录名称
token: ${{ secrets.DEPLOY }}
repository-name: 17359898647/17359898647.github.io # 你的github pages仓库地址
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<p align='center'>
<img src='https://user-images.githubusercontent.com/11247099/111864893-a457fd00-899e-11eb-9f05-f4b88987541d.png' alt='Vitesse - Opinionated Vite Starter Template' width='600'/>
</p>

<h6 align='center'>
<a href="https://vitesse-lite.netlify.app/">Live Demo</a>
<a href="https://17359898647.github.io/">Live Demo</a>
</h6>

<h5 align='center'>
Expand Down

0 comments on commit 332fb80

Please sign in to comment.