forked from Stremio/stremio-web
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.14 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build
on:
push:
branches:
- '**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install NPM dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Lint
run: npm run lint
- name: Deploy to GitHub Pages (multi-branch)
if: env.GITHUB_PAGES_MULTI_BRANCH == 'true'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
destination_dir: ${{ github.ref_name }}
allow_empty_commit: true
- name: Upload build to GitHub Pages
if: 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: env.GITHUB_PAGES_MULTI_BRANCH != 'true'
uses: actions/deploy-pages@v4
with:
artifact_name: stremio-web