-
Notifications
You must be signed in to change notification settings - Fork 7.4k
56 lines (51 loc) · 1.57 KB
/
continuous-deployment.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Continuous deployment
on:
workflow_dispatch:
push:
branches: [main]
jobs:
api_documentation_bump:
name: Deploy API documentation (Bump)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy API documentation
uses: bump-sh/github-action@v1
with:
doc: conduit
token: ${{secrets.BUMP_TOKEN}}
file: api/openapi.yml
deploy_live_demo:
name: Deploy Live (Demo)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
id: setup-node
with:
node-version: '16'
- name: Get node version
id: node
run: |
echo "::set-output name=version::$(node -v)"
- name: Get node_modules cache
uses: actions/cache@v3
id: cache
with:
path: |
**/node_modules
# Adding node version as cache key
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}-${{ steps.node.outputs.version }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --no-audit --prefer-offline --progress=false
- run: npx nx build demo
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: './dist/apps/demo'
github-token: ${{ secrets.GITHUB_TOKEN }}
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.DEMO_NETLIFY_ID }}