Skip to content

Commit

Permalink
feat: update to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Mar 25, 2024
1 parent 845f19e commit 5f34d6f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 37 deletions.
79 changes: 42 additions & 37 deletions .github/workflows/auto-trigger-quark-doc-home-update.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
name: auto trigger quark-doc-home update
# name: auto trigger quark-doc-home update

on:
push:
branches:
- main # default branch
paths:
- ".github/workflows/**"
- "**"
# # on:
# # push:
# # branches:
# # - main # default branch
# # paths:
# # - ".github/workflows/**"
# # - "**"

jobs:
copy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # 检出仓库
- uses: actions/setup-node@v3 # 设置node版本
with:
node-version: 16
- run: npm install
- run: npm run build

# 纯粹就是为了修改一些文件推送到另一个仓库,然后触发另一个仓库的 action
- name: Sync
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main # action 应该部署到的分支。
folder: dist # 操作应该部署的文件夹。
clean: true
repository-name: hellof2e/quark-doc-home
token: ${{ secrets.GIT_ACTION }}
target-folder: auto-trigger/
# on:
# repository_dispatch:
# types: [trigger-action]

# 部署到当前仓库的 gh-pages 分支
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3 # 使用部署到 GitHub pages 的 action
# with:
# publish_dir: ./dist # 部署打包后的 dist 目录
# github_token: ${{ secrets.GITHUB_TOKEN }} # secret 名
# # user_name: ${{ secrets.MY_USER_NAME }}
# # user_email: ${{ secrets.MY_USER_EMAIL }}
# # commit_message: 自动部署 # 部署时的 git 提交信息,自由填写
# jobs:
# copy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3 # 检出仓库
# - uses: actions/setup-node@v3 # 设置node版本
# with:
# node-version: 16
# - run: npm install
# - run: npm run build

# # 纯粹就是为了修改一些文件推送到另一个仓库,然后触发另一个仓库的 action
# - name: Sync
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# branch: main # action 应该部署到的分支。
# folder: dist # 操作应该部署的文件夹。
# clean: true
# repository-name: hellof2e/quark-doc-home
# token: ${{ secrets.GIT_ACTION }}
# target-folder: auto-trigger/

# # 部署到当前仓库的 gh-pages 分支
# # - name: Deploy
# # uses: peaceiris/actions-gh-pages@v3 # 使用部署到 GitHub pages 的 action
# # with:
# # publish_dir: ./dist # 部署打包后的 dist 目录
# # github_token: ${{ secrets.GITHUB_TOKEN }} # secret 名
# # # user_name: ${{ secrets.MY_USER_NAME }}
# # # user_email: ${{ secrets.MY_USER_EMAIL }}
# # # commit_message: 自动部署 # 部署时的 git 提交信息,自由填写
7 changes: 7 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ jobs:
prerelease: false # 是否为预发布版本
# body: |
# 请点击查看 [更新日志]().

- name: Trigger Action
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GIT_ACTION }}
repository: hellof2e/quark-doc-home
event-type: dependencies-update.yml

0 comments on commit 5f34d6f

Please sign in to comment.