-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (36 loc) · 1.31 KB
/
demo.yaml
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
# This workflow will do
# - a clean install of node dependencies
# - run tests
# - build and upload the storybook to a staging area
#
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
on:
push:
branches:
- main
pull_request:
name: Deploy
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'wmde' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Install dependencies
run: npm ci
- name: Build Project as app
run: npm run buildPreview
- name: Deploy to netlify
id: netlify_deploy
run: npx -p netlify-cli
netlify deploy --dir='./dist' --json
--alias $(echo '${{ github.ref }}' | shasum | awk '{print substr($1,0,36)}')
# This hash ⬆ is also calculated and commented on the PR after opening in "comment-deploy-url-to-pr.yml"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}