Skip to content

Commit

Permalink
add actions configuration
Browse files Browse the repository at this point in the history
add actions
  • Loading branch information
versoon committed Jan 22, 2024
1 parent c0fb542 commit b891a80
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to OSS

on:
push:
branches:
- main # 替换为你的默认分支

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18

- name: Build VitePress
run: |
npm install
npm run docs:build
echo 'element.hackslog.com' > docs/.vitepress/dist/CNAME
mv docs/.vitepress/dist ./
- name: Upload to OSS
uses: YangHanlin/oss-deployment-action@v1
with:
oss-endpoint: ${{ ALIYUN_OSS_REGION }}.aliyuncs.com
access-key-id: ${{ secrets.ALIYUN_OSS_ACCESS_KEY_ID }}
access-key-secret: ${{ secrets.ALIYUN_OSS_ACCESS_KEY_SECRET }}
oss-path: oss://${{ ALIYUN_OSS_BUCKET }}/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
```
npm i @huixiong/x-element --save
```

[立即使用:boom:](https://element.hackslog.com/)
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ export default defineConfig({
prev: '上一页',
next: '下一页'
},
socialLinks: [{ icon: 'github', link: 'https://github.com/huixiongyu?tab=repositories' }]
socialLinks: [{ icon: 'github', link: 'https://github.com/huixiongyu/x-element' }]
}
})

0 comments on commit b891a80

Please sign in to comment.