-
-
Notifications
You must be signed in to change notification settings - Fork 644
47 lines (39 loc) · 1.17 KB
/
deploy-xbarappcom.yaml
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
name: Build and Deploy
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * 0" # every week
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22"
- name: Run sitegen
working-directory: tools/sitegen
env:
XBAR_GITHUB_ACCESS_TOKEN: ${{ secrets.XBAR_GITHUB_ACCESS_TOKEN }}
run: ./run.sh -skipdata
- name: Auth with Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: ">= 363.0.0"
- name: Deploy to Google App Engine
working-directory: xbarapp.com
env:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
run: |
VERSION=$(date +%Y%m%d%H%M%S)
gcloud app deploy --project xbarapp --version $VERSION --quiet --verbosity=debug