This repository was archived by the owner on Apr 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (50 loc) · 1.71 KB
/
deploy-web-app.yml
File metadata and controls
50 lines (50 loc) · 1.71 KB
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
name: Deploy Web App to Netlify
on:
push:
branches:
- 'master'
paths-ignore:
- 'api/**'
- 'content-scripts/**'
- 'docs/**'
- 'salesforce/**'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Generate site
run: yarn generate
env:
API_URL: 'https://jamstack-ecommerce-example-api.herokuapp.com'
LOGOUT_URL: 'https://georgwittberger-developer-edition.eu25.force.com/s/logout'
OAUTH2_AUTHORIZE_ENDPOINT: 'https://georgwittberger-developer-edition.eu25.force.com/services/oauth2/authorize'
OAUTH2_USERINFO_ENDPOINT: 'https://jamstack-ecommerce-example-api.herokuapp.com/userinfo'
OAUTH2_CLIENT_ID: ${{ secrets.SALESFORCE_CLIENT_ID }}
OAUTH2_SCOPES: 'openid,id'
- name: Deploy site to Netlify
uses: netlify/actions/cli@master
with:
args: deploy --dir=dist --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}