-
Notifications
You must be signed in to change notification settings - Fork 157
46 lines (42 loc) · 1.32 KB
/
deploy-examples.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
name: Deploy Scalar examples
on:
push:
branches:
- 'main'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Deploy Scalar examples
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install netlify
run: pnpm install -g netlify
- name: Generate Run UUID
run: echo "DEPLOY_ID=$(uuidgen)" >> "$GITHUB_ENV" && echo $DEPLOY_ID
- name: Install dependencies
run: pnpm --filter web install
- name: Turborepo cache
uses: dtinth/setup-github-actions-caching-for-turbo@v1
- name: Build
run: cd examples/web && pnpm turbo run build
env:
DEPLOY_ID: ${{ env.DEPLOY_ID }}
- name: Deploy to netlify
run: |
netlify deploy --dir "./examples/web/dist" \
--message "Deployed from Github - ${{ env.DEPLOY_ID }}" \
--site ${{ vars.NETLIFY_SITE_ID_PREVIEW }} \
--auth ${{ secrets.NETLIFY_AUTH_TOKEN }} \
--filter @scalar-examples/web --prod