Theme preview #32
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: Theme preview | |
| on: | |
| # Temporary disabled due to paused themes addition. | |
| # See: https://github.com/anuraghazra/github-readme-stats/issues/3404 | |
| # pull_request_target: | |
| # types: [opened, edited, reopened, synchronize] | |
| # branches: | |
| # - master | |
| # paths: | |
| # - "themes/index.js" | |
| deployment_status: | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| checks: read | |
| contents: read | |
| deployments: read | |
| issues: read | |
| discussions: read | |
| packages: read | |
| pages: read | |
| pull-requests: write | |
| repository-projects: read | |
| security-events: read | |
| statuses: read | |
| jobs: | |
| previewTheme: | |
| name: Install & Preview | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - uses: bahmutov/npm-install@3e063b974f0d209807684aa23e534b3dde517fd9 # v1.11.2 | |
| with: | |
| useLockFile: false | |
| - run: npm run preview-theme | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Prefer a stable branch URL if provided by Vercel; otherwise use the target commit URL. | |
| BASE_URL: ${{ github.event.deployment_status.target_url }} |