forked from avillar/bblocks-viewer
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 983 Bytes
/
gh-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
name: GitHub Pages deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies and build
run: |
npm install
yarn build --base=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
cp index.html dist/404.html
- name: Setup GH Pages
uses: actions/configure-pages@v3
- name: Upload GH Pages
uses: actions/upload-pages-artifact@v1
with:
path: './dist'
- name: Deploy GH Pages
uses: actions/deploy-pages@v1