diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94dc3e048..59bcd5ee2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,9 @@ name: Build -on: push +on: + push: + branches: + - '*' jobs: build: @@ -9,11 +12,17 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Install NPM dependencies - run: npm install + run: npm ci - name: Build run: npm run build - - name: Upload build artifact - uses: actions/upload-artifact@v2 + - name: Test + run: npm test + - name: Lint + run: npm run lint + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 with: - name: stremio-web - path: build + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '' }} + allow_empty_commit: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a3ebba0ff..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Test - -on: push - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install NPM dependencies - run: npm install - - name: Test - run: npm test - - name: Lint - run: npm run lint