-
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (44 loc) · 1.17 KB
/
deploy.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
45
46
47
name: deploy
on:
workflow_dispatch:
push:
paths:
- config/**
- html/**
- src/**
- rspack.config.ts
- tsconfig.json
- package.json
- yarn.lock
branches:
- dev
- main
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Deploy to github pages
if: ${{ github.ref == 'refs/heads/dev' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages
token: ${{ secrets.DEPLOY_TOKEN }}
repository-name: typescript-tutorial-exercises/preview
- name: Deploy to github pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages
token: ${{ secrets.DEPLOY_TOKEN }}
repository-name: typescript-tutorial-exercises/typescript-tutorial-exercises.github.io