✨ Add middleware to add delay in dev environment #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push Transito Server Docker image to Google Cloud Platform | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
id-token: "write" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- id: auth | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCE_SA_KEY }} | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
- name: Configure Docker Client | |
run: gcloud auth configure-docker us-west1-docker.pkg.dev --quiet | |
- name: Create ENV file for Docker Compose | |
run: | | |
touch .env | |
echo LTA_API_KEY=${{ secrets.LTA_API_KEY }} >> .env | |
echo SECRET=${{ secrets.JSON_SECRET }} >> .env | |
echo PORT=80 >> .env | |
- name: Build and push image to Artifact Registry | |
run: | | |
docker compose build | |
docker compose push | |
- name: Restart Cloud Engine to use new image | |
run: | | |
gcloud compute instances reset transito-server --zone=us-west1-b |