-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 942 Bytes
/
build-website.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
name: Build website
on:
workflow_call:
inputs:
environment:
required: true
type: string
jobs:
website:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js and Yarn
uses: ./.github/actions/node
- name: Download the build artifact
uses: actions/download-artifact@v3
with:
name: pkg-build-${{ github.run_id }}
path: dist
- name: Copy build artifacts to public
shell: bash
run: cp dist/*.js example/public
- name: Build website
shell: bash
run: yarn website:build
# This action uploads an artifact named `github-pages` which will be used by actions/deploy-pages
- name: Upload artifact
if: ${{ inputs.environment == 'production' }}
uses: actions/upload-pages-artifact@v1
with:
path: ./example/dist