From 7540adfc7524fa28eb9768c95b9ddd9fff5b6273 Mon Sep 17 00:00:00 2001 From: xsf0105 Date: Tue, 26 Mar 2024 19:27:07 +0800 Subject: [PATCH] update: website v2 --- .github/workflows/deploy-v2-site.yml | 45 ++++++++++++++++++++++++++++ .github/workflows/deploy2io.yml | 30 ------------------- 2 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/deploy-v2-site.yml delete mode 100644 .github/workflows/deploy2io.yml diff --git a/.github/workflows/deploy-v2-site.yml b/.github/workflows/deploy-v2-site.yml new file mode 100644 index 0000000..4263891 --- /dev/null +++ b/.github/workflows/deploy-v2-site.yml @@ -0,0 +1,45 @@ +name: sync to quark-ecosystem/quarkd-docs + +on: + # 触发条件1 + push: + branches: + - main # default branch + paths: + - ".github/workflows/**" + - "**" + + # 触发条件2 + repository_dispatch: + types: [my-event] + +jobs: + publish-site: + 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 + + - name: Sync + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: main # action 应该部署到的分支。 + folder: dist # 操作应该部署的文件夹。 + clean: true + repository-name: quark-ecosystem/quarkd-docs + token: ${{ secrets.GIT_ACTION }} + target-folder: angular/ + + # 部署到当前仓库的 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 提交信息,自由填写 \ No newline at end of file diff --git a/.github/workflows/deploy2io.yml b/.github/workflows/deploy2io.yml deleted file mode 100644 index 54c181c..0000000 --- a/.github/workflows/deploy2io.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: sync to github.io - -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 - - - name: Sync - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: main # action 应该部署到的分支。 - folder: dist # 操作应该部署的文件夹。 - clean: false - repository-name: hellof2e/angular-quarkd.github.io - token: ${{ secrets.GIT_ACTION }} - target-folder: /