From c6fd565b7ef545d2cd25d67004ec82c8e86eafe4 Mon Sep 17 00:00:00 2001 From: xu_yanfeng Date: Mon, 3 Feb 2025 13:30:14 +0800 Subject: [PATCH] pages --- .github/workflows/main.yml | 73 ++++++++++++++++++++++---------------- package.json | 6 ++-- 2 files changed, 45 insertions(+), 34 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 905ca1b..0f06538 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,49 +1,60 @@ # This is a basic workflow to help you get started with Actions -name: CI +name: Deploy static content to Pages # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master ] - pull_request: - branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-22.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Run a one-line script - run: | - cd ./source - npm run build - - - name: webext-buildtools-chrome-crx-action - # You may pin to the exact commit or the version. - # uses: cardinalby/webext-buildtools-chrome-crx-action@6ffc20d012116ea3fa0c6697382b026fc7df9535 - uses: cardinalby/webext-buildtools-chrome-crx-action@2.0.0 + - name: Checkout + uses: actions/checkout@v3 + - name: install + run: npm run installForce + - name: pack web + run: npm run ccp-pack-web + - name: DeployWithDeleteLatestResult + uses: peaceiris/actions-gh-pages@v3 with: - # Path to WebExtension directory - zipFilePath: "./" - # Path to save result crx file - crxFilePath: "./" - # Contents of private key used to sign crx file - privateKey: "./key.pem" - # Path to save update.xml file for extensions hosted not on Chrome Web Store. This xml is used as response at url, specified in manifest's `update_url` key file - updateXmlPath:1 # optional - # Required, if you specified updateXmlPath. URL to the .crx file - updateXmlCodebaseUrl: 1# optional - # App Id to use in update.xml file. Generated from private key by default - updateXmlAppId: 1# optional + personal_token: ${{ secrets.PERSONAL_TOKEN }} + publish_dir: ./web + external_repository: tidys/cc-inspector-chrome + publish_branch: gh-pages + keep_files: true + exclude_assets: '*.js,*.css' + - name: DeployJsCss + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.PERSONAL_TOKEN }} + publish_dir: ./web + external_repository: tidys/cc-inspector-chrome + publish_branch: gh-pages + keep_files: true + exclude_assets: '' diff --git a/package.json b/package.json index c5aaf9d..4a7dc5d 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "@types/lodash": "^4.14.176", "@types/node": "16.11.12", "@types/uuid": "^8.3.1", - "@xuyanfeng/cc-ui": "file:.yalc/@xuyanfeng/cc-ui", - "cc-plugin": "file:.yalc/cc-plugin" + "@xuyanfeng/cc-ui": "0.2.37", + "cc-plugin": "2.2.2" }, "name": "cc-plugin-demo", "scripts": { @@ -31,4 +31,4 @@ "tiny-emitter": "2.1.0", "uuid": "^8.3.2" } -} +} \ No newline at end of file