-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.46 KB
/
deploy.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
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.19'
- name: Build
run: go build
- name: Test
run: go test
deploy:
name: Deploy application
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Deploy
run: echo "::warning file=.github/workflows/deploy.yaml,line=31,endLine=32,title=No Deploy step defined::Define your custom workflow for deploying your subgraph here."
publish_schema:
name: Publish new schema to Apollo Studio
if: false
needs: [ deploy ]
env:
APOLLO_VCS_COMMIT: ${{ github.event.pull_request.head.sha }}
# rename this to a valid subgraph name
SUBGRAPH_NAME: foo-bar
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rover
run: |
curl -sSL https://rover.apollo.dev/nix/latest | sh
echo "$HOME/.rover/bin" >> $GITHUB_PATH
- name: Publish Schema
run: rover subgraph publish ${{ secrets.APOLLO_GRAPH_REF }} --schema graph/schema.graphqls --name ${{ env.SUBGRAPH_NAME }} --routing-url ${{ secrets.PRODUCTION_URL }}
env:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}