Skip to content

Commit 92d583c

Browse files
mergify[bot]tthvo
andauthored
fix(ci): preview ci should target all under src (#1054) (#1101)
Signed-off-by: Thuan Vo <[email protected]> (cherry picked from commit db0d4cf) # Conflicts: # .github/workflows/ci-preview.yml Co-authored-by: Thuan Vo <[email protected]>
1 parent e6c4aaa commit 92d583c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci-preview.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate Preview (CI)
2+
3+
concurrency:
4+
group: ci
5+
cancel-in-progress: true
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'src/**'
14+
- '!src/test/**'
15+
- 'webpack.*.js'
16+
- 'yarn.lock'
17+
- 'tsconfig.json'
18+
19+
jobs:
20+
build-preview:
21+
if: ${{ github.repository_owner == 'cryostatio' }}
22+
env:
23+
DEPLOY_DOMAIN: ${{ github.repository_owner }}-${{ github.event.repository.name }}-main.surge.sh
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Use Node.js 18
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: 18
31+
- uses: bahmutov/npm-install@v1
32+
- name: Build assets
33+
run: yarn build:preview:notests
34+
- name: Publish to surge
35+
run: |
36+
npx surge --project ./dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}

0 commit comments

Comments
 (0)