chore: Reconfigure broken Codacy code coverage #1031
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy website | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - docs/** | |
| permissions: | |
| contents: read | |
| packages: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_VERSION: 24 | |
| jobs: | |
| deploy: | |
| name: Cloudflare Pages | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: docs | |
| environment: | |
| name: stockindicators.dev | |
| url: ${{ steps.deploy.outputs.pages-deployment-alias-url }} | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # required for proper Last Updated page dates | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| run_install: false | |
| package_json_file: docs/package.json | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "pnpm" | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: Configure pnpm registry auth | |
| run: pnpm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install pnpm packages | |
| run: pnpm install --frozen-lockfile | |
| - name: Define tag | |
| id: tag | |
| run: echo "version=$(date +'%Y.%m.%d')-${{ github.run_number }}" >> $GITHUB_OUTPUT | |
| - name: Build site (production) | |
| if: github.ref == 'refs/heads/main' | |
| run: pnpm run docs:build | |
| env: | |
| NODE_ENV: production | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build site (preview) | |
| if: github.ref != 'refs/heads/main' | |
| run: pnpm run docs:build | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to Cloudflare Pages | |
| id: deploy | |
| uses: cloudflare/wrangler-action@v3.14.1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_KEY }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: > | |
| pages deploy docs/.vitepress/dist | |
| --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} |