From 794494916fd4ed26c0c88576aa3c3ce0832259b3 Mon Sep 17 00:00:00 2001 From: syf20020816 Date: Fri, 24 Jan 2025 03:43:15 -0800 Subject: [PATCH] use main.yaml --- .github/workflows/main.yml | 4 ++-- .github/workflows/npm-publish.yml | 33 ------------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b0e5bd..46e0536 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: push: branches: [main] pull_request: - branches: [main, preview] + branches: [main] workflow_dispatch: @@ -35,7 +35,7 @@ jobs: cache: npm - name: Setup Pages uses: actions/configure-pages@v5 - if: github.repository_owner == 'syf20020816' + if: github.repository_owner == 'privoce' - name: Install dependencies run: npm install - name: Build with Rspress diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 2a4766d..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}}