-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.27 KB
/
deploy.yml
File metadata and controls
44 lines (42 loc) · 1.27 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
name: Deploy
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy'
required: true
default: 'main'
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v3
with:
path: 'website'
- uses: actions/checkout@v3
with:
repository: 'HelloAOLab/bible-api'
ref: ${{ github.event.inputs.branch }}
path: 'api'
- name: Yarn Install
run: |
cd website
yarn
cd ../api
yarn
- name: Build API
working-directory: 'api'
run: |
yarn build-api
- name: Deploy
working-directory: 'website'
run: |
cp ./CNAME ../api/build/CNAME
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn run deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}