-
-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (36 loc) · 1010 Bytes
/
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
45
name: Build
on:
# Runs on pull requests targeting the default branch
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow this workflow to be called by other workflows
workflow_call:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup app
uses: ./.github/actions/setup
- name: Restore cache
uses: actions/cache@v3
with:
path: |
dist
key: ${{ runner.os }}-build-${{ hashFiles('dist') }}
restore-keys: |
${{ runner.os }}-build-
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Static HTML export
run: npm run build -- --base=${{ steps.pages.outputs.base_url }}/
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist