mirror of
https://github.com/vercel/commerce.git
synced 2025-05-09 19:27:53 +00:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: '[Develop] Deploy Functions'
|
|
|
|
env:
|
|
COMPANY_NAME: ${{ vars.COMPANY_NAME }}
|
|
TWITTER_CREATOR: ${{ vars.TWITTER_CREATOR }}
|
|
TWITTER_SITE: ${{ vars.TWITTER_SITE }}
|
|
SITE_NAME: ${{ vars.SITE_NAME }}
|
|
SHOPIFY_REVALIDATION_SECRET: ${{ secrets.SHOPIFY_REVALIDATION_SECRET }}
|
|
SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ vars.SHOPIFY_STOREFRONT_ACCESS_TOKEN }}
|
|
SHOPIFY_STORE_DOMAIN: ${{ vars.SHOPIFY_STORE_DOMAIN }}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy-to-gcp:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: 'actions/checkout@v4'
|
|
|
|
- name: Authenticate with Google Cloud
|
|
id: auth
|
|
uses: google-github-actions/auth@v2
|
|
with:
|
|
project_id: ${{ vars.PROJECT_ID }}
|
|
service_account: ${{ vars.WORKLOAD_SERVICE_ACCOUNT }}
|
|
workload_identity_provider: ${{ env.WORKLOAD_IDENTITY_PROVIDER }}
|
|
create_credentials_file: true
|
|
|
|
# https://github.com/marketplace/actions/deploy-to-cloud-run
|
|
- name: Build and Deploy to Google CloudRun
|
|
id: 'deploy'
|
|
uses: 'google-github-actions/deploy-cloudrun@v2'
|
|
with:
|
|
service: ${{ vars.APP_NAME }}
|
|
|
|
- name: 'Use output'
|
|
run: 'curl "${{ steps.deploy.outputs.url }}"'
|