Skip to content

fix: CR comments

fix: CR comments #65

Workflow file for this run

name: Build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
# Allow manual dispatch in GH
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install NPM dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Lint
run: npm run lint
# Create recursivelly the destiantion dir with
# "--parrents where no error if existing, make parent directories as needed."
- run: mkdir -p ./build/${{ github.head_ref || github.ref_name }}
- name: Deploy to GitHub Pages (multi-branch)
if: github.event_name == 'push' && github.actor != 'dependabot[bot]' && env.GITHUB_PAGES_MULTI_BRANCH == 'true'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
# in stremio, we use `feat/features-name` or `fix/this-bug`
# so we need a recursive creation of the destination dir
destination_dir: ${{ github.head_ref || github.ref_name }}
allow_empty_commit: true
- name: Upload build to GitHub Pages
if: github.event_name == 'push' && env.GITHUB_PAGES_MULTI_BRANCH != 'true'
uses: actions/upload-pages-artifact@v3
with:
name: stremio-web
path: build
- name: Deploy build to GitHub Pages (single branch)
if: github.event_name == 'push' && env.GITHUB_PAGES_MULTI_BRANCH != 'true'
uses: actions/deploy-pages@v4
with:
artifact_name: stremio-web