diff --git a/.github/workflows/deploy-to-gh-pages.yml b/.github/workflows/deploy-to-gh-pages.yml index df94bd52..658d4461 100644 --- a/.github/workflows/deploy-to-gh-pages.yml +++ b/.github/workflows/deploy-to-gh-pages.yml @@ -7,8 +7,14 @@ on: tags: - '**' + workflow_dispatch: + +concurrency: + group: 'pages' + cancel-in-progress: true + jobs: - publish: + build: runs-on: ubuntu-latest strategy: matrix: @@ -24,11 +30,29 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: pnpm install - - name: Deploy with gh-pages - run: | - git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - npm run deploy -- -u "github-actions-bot " + run: pnpm install --frozen-lockfile + - name: Build + run: pnpm run build env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VITE_GROWTH_BOOK_KEY: ${{ secrets.VITE_GROWTH_BOOK_KEY }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: 'dist/' + + deploy: + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index f96f7014..15e7fbfc 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -2,9 +2,6 @@ name: Lighthouse CI on: [push] -env: - VITE_GROWTH_BOOK_KEY: key_prod_b3021771bb20a0c2 - jobs: lighthouseci: runs-on: ubuntu-latest @@ -21,8 +18,11 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'pnpm' - - run: pnpm i && pnpm install -g @lhci/cli@0.12.x + - name: Install dependencies + run: pnpm install --frozen-lockfile && pnpm add -g @lhci/cli@0.12.x - run: pnpm run build + env: + VITE_GROWTH_BOOK_KEY: ${{ secrets.VITE_GROWTH_BOOK_KEY }} - run: lhci autorun env: LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 36026546..1f2d4951 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,6 +19,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Run ESLint run: pnpm run lint diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 9d5065b1..ec20d398 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -27,7 +27,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0be43123..b4d06067 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Run tests run: pnpm test