Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| abf975fadb | |||
| b96cc24527 | |||
| 0d1aaf940b | |||
| 2849b21d30 | |||
| 89205aa4e5 | |||
|
|
02220024be | ||
| bdd237b971 | |||
|
|
8d0d4ca27c | ||
| f3746731a5 | |||
|
|
2d62f64dfa |
52
.github/workflows/cd.yml
vendored
Normal file
52
.github/workflows/cd.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: cd
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
permissions:
|
||||
contents: 'read'
|
||||
id-token: 'write'
|
||||
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23.0"
|
||||
|
||||
- name: Build
|
||||
run: scripts/buildprod.sh
|
||||
|
||||
- id: 'auth'
|
||||
uses: 'google-github-actions/auth@v2'
|
||||
with:
|
||||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
|
||||
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v2'
|
||||
|
||||
- name: 'Use gcloud CLI'
|
||||
run: 'gcloud info'
|
||||
|
||||
- name: Push to Google
|
||||
run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-453912/notely-ar-repo/notely:latest .
|
||||
|
||||
- name: Install Goose
|
||||
run: go install github.com/pressly/goose/v3/cmd/goose@latest
|
||||
|
||||
- name: Run migrations
|
||||
run: scripts/migrateup.sh
|
||||
|
||||
- name: Deploy to Cloud Run
|
||||
run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-453912/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-453912 --max-instances=4
|
||||
@@ -7,7 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body class="section">
|
||||
<h1>Notely</h1>
|
||||
<h1>Welcome to Notely</h1>
|
||||
|
||||
<div id="userCreationContainer" class="section">
|
||||
<input id="nameField" type="text" placeholder="Enter your name">
|
||||
|
||||
Reference in New Issue
Block a user