Skip to content

feat(ci-cd): ready for merge #9

feat(ci-cd): ready for merge

feat(ci-cd): ready for merge #9

name: Deploy Xplorers API to GCP
on: push
permissions:
contents: read
id-token: write
jobs:
deploy-xplorers-api:
name: Deploy Xplorers API to GCP
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- id: auth
uses: google-github-actions/[email protected]
with:
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WORKLOAD_IDENTITY_PROVIDER }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install taskfile
run: |
sudo snap install task --classic
- name: Terraform Plan
run: task terraform-plan
- name: Terraform Apply
if: github.ref == 'refs/heads/"main"' && github.event_name == 'push'
run: task terraform-apply