From 5306644629d7c78587ea94d9dc1d0d57d7149b13 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Sun, 18 Feb 2024 10:06:49 +0100 Subject: [PATCH] ci: fix website deployment --- .github/workflows/build.yml | 34 ++++++---------------------------- .github/workflows/website.yml | 9 +++++++-- package.json | 2 +- yarn.lock | 10 +++++----- 4 files changed, 19 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15624c1228d..9bfe0afdb55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -273,31 +273,9 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} run: yarn release - - publish-docs: - runs-on: ubuntu-latest - needs: deploy-packages - strategy: - matrix: - node-version: [18.x] - - steps: - - uses: actions/checkout@v3 - with: - ref: "production" - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: yarn install --immutable --network-timeout 500000 - - name: Build pages - env: - CI: true - run: yarn api:build && yarn vuepress:docs:build - - name: Publish pages - env: - CI: true - GH_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn docs:publish + - name: "Trigger Website workflow" + run: | + curl -X POST https://api.github.com/repos/tsedio/tsed/actions/workflows/website.yml/dispatches \ + -H 'Accept: application/vnd.github.everest-preview+json' \ + -H 'Authorization: Bearer ${{secrets.GH_TOKEN}}' \ + --data '{"ref": "production"}' diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index a6a517f1cd3..d3d97b1fb60 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -6,12 +6,17 @@ name: Website on: workflow_dispatch: +permissions: + contents: read + pages: write + id-token: write + jobs: publish-docs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -34,7 +39,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/package.json b/package.json index 9dcffbb77fc..a944be34099 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "@swc/core": "1.3.41", "@swc/helpers": "0.4.14", "@swc/jest": "0.2.20", - "@tsed/monorepo-utils": "2.1.0", + "@tsed/monorepo-utils": "2.1.1", "@tsed/ts-doc": "4.0.14", "@types/axios": "0.14.0", "@types/chai": "4.3.0", diff --git a/yarn.lock b/yarn.lock index c0e24bf3898..a09fd35a59a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6856,9 +6856,9 @@ __metadata: languageName: unknown linkType: soft -"@tsed/monorepo-utils@npm:2.1.0": - version: 2.1.0 - resolution: "@tsed/monorepo-utils@npm:2.1.0" +"@tsed/monorepo-utils@npm:2.1.1": + version: 2.1.1 + resolution: "@tsed/monorepo-utils@npm:2.1.1" dependencies: "@samverschueren/stream-to-observable": "npm:>=0.3.1" "@typescript-eslint/typescript-estree": "npm:>=6.20.0" @@ -6885,7 +6885,7 @@ __metadata: semantic-release: ">=19" bin: monorepo: bin/monorepo.js - checksum: 10/f906f747deb85e4386b9d2864d3e6f94e564432164f5b8b442c8c24a32f27732bc2640c75f0d800993da88e625cd581b39b2574efbac4a5ca1eef3156d3a410c + checksum: 10/a97ce2a04535e79a7763c8952d78cbac9c560c24d653cf6248766f77497c9eb35abb3bed0510ce3d98f6d26624007eff1d30df2a5d68916b1e1d7dc9d0c43ab0 languageName: node linkType: hard @@ -7641,7 +7641,7 @@ __metadata: "@swc/helpers": "npm:0.4.14" "@swc/jest": "npm:0.2.20" "@tsed/logger": "npm:>=6.2.2" - "@tsed/monorepo-utils": "npm:2.1.0" + "@tsed/monorepo-utils": "npm:2.1.1" "@tsed/ts-doc": "npm:4.0.14" "@types/axios": "npm:0.14.0" "@types/chai": "npm:4.3.0"