fix icon issue #187
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: "Website: Build-and-Release" | |
| concurrency: | |
| group: ${{ github.head_ref }}-charts-website-release | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '**' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**' | |
| # Use `bash --noprofile --norc -exo pipefail` by default for all `run` steps in this workflow: | |
| # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| release-website: | |
| permissions: | |
| pull-requests: write | |
| name: "${{ github.ref == 'refs/heads/main' && '(Production)' || '(Preview)' }}" | |
| runs-on: | |
| group: default | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Comment deploy start | |
| if: github.event_name != 'push' | |
| continue-on-error: true | |
| uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 | |
| with: | |
| message-id: cloudflare-deploy | |
| message: | | |
| ### π§ Deploy Preview building... | |
| | Name | Link | | |
| |---------------------|-------------------------------------------------------------------------------| | |
| |π¨ Latest commit | ${{ github.sha }} | | |
| |π Latest deploy log | https:/github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | | |
| --- | |
| - name: Setup Node | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | |
| with: | |
| node-version-file: ./.nvmrc | |
| - name: Fix Package-Lock | |
| run: npm i --package-lock-only | |
| - name: Setup astro Cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| # Cache for build and optimized images. | |
| key: astro-${{ hashFiles('package-lock.json') }} | |
| path: ./.astro | |
| restore-keys: astro- | |
| - name: Setup npm Cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| # Cache for npm | |
| path: ~/.npm | |
| key: npm-${{ hashFiles('package-lock.json') }} | |
| restore-keys: npm- | |
| - name: Setup node_modules Cache | |
| id: modulescache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| # Cache for npm and optimized images. | |
| path: ./node_modules | |
| key: modules-${{ hashFiles('package-lock.json') }} | |
| - name: Install Packages | |
| if: steps.modulescache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - name: Check | |
| run: npm run check | |
| - name: Build | |
| run: npm run build | |
| - name: Comment deploy start | |
| if: github.event_name != 'push' | |
| continue-on-error: true | |
| uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 | |
| with: | |
| message-id: cloudflare-deploy | |
| message: | | |
| ### π§ Deploy Preview building... | |
| | Name | Link | | |
| |---------------------|-------------------------------------------------------------------------------| | |
| |π¨ Latest commit | ${{ github.sha }} | | |
| |π Latest deploy log | https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | | |
| --- | |
| - name: Publish to Cloudflare Pages | |
| id: cloudflare | |
| continue-on-error: true | |
| uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| # By default Cloudflare marks `main` as the "production" branch. | |
| # So when this workflow is pushed to refs/heads/main, we set the branch to `main`/"production". | |
| branch: ${{ github.ref == 'refs/heads/main' && 'main' || github.head_ref }} | |
| # The project name in Cloudflare | |
| projectName: trueforge-website | |
| directory: ./build | |
| wranglerVersion: "3" | |
| - name: Comment deploy url | |
| if: github.event_name != 'push' | |
| continue-on-error: true | |
| uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 | |
| with: | |
| message-id: cloudflare-deploy | |
| message: | | |
| ### β Deploy Preview ready! | |
| | Name | Link | | |
| |----------------------|-------------------------------------------------------------------------------| | |
| |π¨ Latest commit | ${{ github.sha }} | | |
| |π Latest deploy log | https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | | |
| |π Deploy Preview Url | [${{ steps.cloudflare.outputs.url }}](${{ steps.cloudflare.outputs.url }}) | | |
| |π³ Environment | ${{ steps.cloudflare.outputs.environment }} | | |
| --- | |
| - name: Release-and-Website Completed | |
| run: echo "DONE" |