-
Notifications
You must be signed in to change notification settings - Fork 53
126 lines (106 loc) · 3.54 KB
/
deploy.yml
File metadata and controls
126 lines (106 loc) · 3.54 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Deploy
on:
push:
tags:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Cache node modules @ example
uses: actions/cache@v1
id: cache-example
with:
path: ./example/node_modules
key: node-modules-example--${{ hashFiles('example/yarn.lock') }}
- name: Install dependencies @ example
if: steps.cache-example.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --cwd ./example
- name: Cache node modules @ website
uses: actions/cache@v1
id: cache-website
with:
path: ./website/node_modules
key: node-modules-website-${{ hashFiles('website/yarn.lock') }}
- name: Install dependencies @ website
if: steps.cache-website.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --cwd ./website
webiste:
name: Deploy website
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Cache node modules @ website
uses: actions/cache@v1
id: cache-website
with:
path: ./website/node_modules
key: node-modules-website-${{ hashFiles('website/yarn.lock') }}
- name: Cache node modules @ example
uses: actions/cache@v1
id: cache-example
with:
path: ./example/node_modules
key: node-modules-example--${{ hashFiles('example/yarn.lock') }}
- name: Deploy to GH Pages
working-directory: ./website
run: |
git config --global user.name ${{ secrets.GH_DEPLOY_USERNAME }}
git config --global user.email ${{ secrets.GH_DEPLOY_EMAIL }}
echo "machine github.com login ${{ secrets.GH_DEPLOY_NAME }} password ${{ secrets.GH_TOKEN }}" > ~/.netrc
GIT_USER=${{ secrets.GH_DEPLOY_NAME }} yarn run deploy
expo:
name: Deploy Expo App
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: Cache node modules @ website
uses: actions/cache@v1
id: cache-website
with:
path: ./website/node_modules
key: node-modules-website-${{ hashFiles('website/yarn.lock') }}
- name: Cache node modules @ example
uses: actions/cache@v1
id: cache-example
with:
path: ./example/node_modules
key: node-modules-example--${{ hashFiles('example/yarn.lock') }}
- name: Setup Expo
uses: expo/expo-github-action@v5
with:
expo-version: 3.x
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
expo-cache: true
- name: Deploy Example App
working-directory: ./example
run: expo publish