Skip to content

Commit

Permalink
feat: ci/cd pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Firgrep committed Oct 12, 2023
1 parent 6bcdb37 commit 5189570
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI/CD to Google App Engine

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Auth
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'

- name: Deploy
uses: 'google-github-actions/deploy-appengine@v1'
with:
build_dir: ./out
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# Ignore generated credentials from google-github-actions/auth
gha-creds-*.json
12 changes: 12 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /
static_files: www/index.html
upload: www/index.html

- url: /(.*)
static_files: www/\1
upload: www/(.*)

0 comments on commit 5189570

Please sign in to comment.