-
Notifications
You must be signed in to change notification settings - Fork 18
123 lines (101 loc) · 3.89 KB
/
main.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
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
name: Deploy
# https://github.com/nyakaz73/heroku-django-deploy/blob/master/.github/workflows/main.yml
# https://github.com/marketplace/actions/deploy-to-heroku#deploy-subdirectory
# https://github.com/nyakaz73/heroku-django-deploy
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# DISABLE AS DB IS BEING MIGRATED OUT OF HEROKu
# Backend_Deploy:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./backend
# if: "!contains(github.event.head_commit.message, '[ci skip]')"
# name: Git Deploy job- A job to deploy django app to heroku using git
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Deploy django to heroku
# uses: nyakaz73/[email protected]
# with:
# heroku_app_name : ${{ secrets.HEROKU_APP_NAME }}
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
# heroku_email_address: "[email protected]"
# working-directory: ./backend
# use_git: true
# force_push: true
# #Use the output from the hello step
# - name: Get the output status
# run: echo "${{ steps.deploy.outputs.status }}"
# - name: Getting the files in directory
# run: pwd
Expo_Web_Build:
# name: Export a an Expo web build for Vercel deployment
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
# DISABLED DURING MIGRATION
# needs: Backend_Deploy
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v2
- name: 🏗 Setup Node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: yarn
cache-dependency-path: './frontend/yarn.lock'
- name: 🏗 Setup Expo
uses: expo/expo-github-action@v5
with:
expo-version: 4.x
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
expo-token: ${{ secrets.EXPO_TOKEN }}
expo-cache: true
- name: 📦 Install dependencies
run: yarn install
# DISABLE UNTIL MODULES ARE RESOLVED
# - name: 🚀 Publish preview
# run: expo publish --release-channel=pr-${{ github.event.number }} --non-interactive
# - name: 💬 Comment preview
# uses: expo/expo-github-action/preview-comment@v7
# with:
# channel: pr-${{ github.event.number }}
# DISABLE INCONSEQUENTIAL
# The web deployment is handled by Vercel
# - run: expo build:web
# - run: rm -fr .gitignore
# - run: deploy
#- run: cd web-build
#- uses: amondnet/vercel-action@v20
#with:
#vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
#vercel-org-id: ${{ secrets.ORG_ID}}
#vercel-project-id: ${{ secrets.PROJECT_ID}}
# working-directory: web-build
# Frontend_Deploy:
# name: Deploy to Frontend To Vercel
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./frontend
# needs: Expo_Web_Build
# steps:
# - run: yarn install
# - run: expo build:web
# - uses: actions/checkout@v2
# - uses: amondnet/vercel-action@v20
# with:
# vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
# # github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
# # vercel-args: '--prod' #Optional
# vercel-org-id: ${{ secrets.ORG_ID}} #Required
# vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
# vercel-project-name: thrifthub
# working-directory: frontend/web-build