This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
Build and deploy the application to Koyeb #499
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 deploy the application to Koyeb | |
on: | |
schedule: | |
- cron: '35 7 * * *' | |
push: | |
branches: | |
- '*' | |
jobs: | |
deploy: | |
concurrency: | |
group: "${{ github.ref_name }}" | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install and configure the Koyeb CLI | |
uses: koyeb-community/koyeb-actions@v2 | |
with: | |
api_token: "${{ secrets.KOYEB_EXAMPLES_APPS_TOKEN }}" | |
- name: Create application secret | |
uses: koyeb/action-git-deploy/secret@v1 | |
with: | |
secret-name: RAILS_DEVISE_DATABASE_URL | |
secret-value: "${{ secrets.POSTGRES_URL }}" | |
- name: Build and deploy the application | |
uses: koyeb/action-git-deploy@v1 | |
with: | |
app-name: rails-devise-${{ github.ref_name }} | |
service-env: "DATABASE_URL=@RAILS_DEVISE_DATABASE_URL,DISABLE_DATABASE_ENVIRONMENT_CHECK=1,NODE_OPTIONS=--openssl-legacy-provider" | |
service-ports: "3000:http" | |
service-routes: "/:3000" | |
git-run-command: "rails db:reset && rails db:migrate && rails db:seed && rails server" | |
skip-cache: true |