Skip to content

Commit

Permalink
Merge pull request #16 from shion1305/fix-cloud-run-update_type-imports
Browse files Browse the repository at this point in the history
CloudRun 更新方法の修正 / type import 方法の修正
  • Loading branch information
Shion1305 authored Mar 12, 2024
2 parents 5138809 + f227a1d commit 67054d8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/deploy-cloudrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,22 @@ jobs:
context: .
file: ./cloudrun/Dockerfile

- name: Download Cloud Run Service YAML
run: |
gcloud run services describe release --format yaml --region asia-northeast1 > ./cloudrun-service.yaml
# replace github_sha field to latest commit sha. Changing spec.template is required to deploy new revision.
# reference: https://cloud.google.com/run/docs/deploying?hl=ja#revision -- check yaml tab.
- name: Change some property of service-frontend-release.yaml
run: |
sed -i "s/github_sha: .*/github_sha: ${{ github.sha }}/g" ./cloudrun-service.yaml
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
region: asia-northeast1
service: release
image: asia-northeast1-docker.pkg.dev/lumos-profile-management/main/nuxt3-release:latest
region: "asia-northeast1"
metadata: "./cloudrun-service.yaml"

- name: Make CloudRun accessible
run: |
Expand Down
2 changes: 1 addition & 1 deletion pages/admin/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import axios from 'axios'
import { UserProfile } from '~/types/user_profile'
import type { UserProfile } from '~/types/user_profile'
const { data: membersData, error } = await axios
.get('/api/admin/members')
Expand Down
2 changes: 1 addition & 1 deletion pages/profile/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { fulfillsRequirements, UserProfile } from '~/types/user_profile'
import { fulfillsRequirements, type UserProfile } from '~/types/user_profile'
import axios from 'axios'
import LineWidget from '~/components/LineWidget.vue'
import DiscordWidget from '~/components/DiscordWidget.vue'
Expand Down
4 changes: 2 additions & 2 deletions server/api/admin/members.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import admin from '~/server/pkg/firebase-admin'
import { User } from '~/server/types/user'
import { UserProfile } from '~/server/types/user_profile'
import type { User } from '~/server/types/user'
import type { UserProfile } from '~/server/types/user_profile'
import { listGuildMembers } from '~/server/pkg/discord/api-bot'

const db = admin.firestore()
Expand Down
4 changes: 2 additions & 2 deletions server/api/info.get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import admin from '~/server/pkg/firebase-admin'
import { User } from '~/server/types/user'
import { UserProfile } from '~/server/types/user_profile'
import type { User } from '~/server/types/user'
import type { UserProfile } from '~/server/types/user_profile'

const db = admin.firestore()

Expand Down
6 changes: 3 additions & 3 deletions server/api/mutate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import admin from '~/server/pkg/firebase-admin'
import { User } from '~/server/types/user'
import { UserProfile } from '~/server/types/user_profile'
import { MutateRequest } from '~/server/types/api/internal/mutate'
import type { User } from '~/server/types/user'
import type { UserProfile } from '~/server/types/user_profile'
import type { MutateRequest } from '~/server/types/api/internal/mutate'

const db = admin.firestore()

Expand Down

0 comments on commit 67054d8

Please sign in to comment.