schools-api/.github/workflows/deploy.yml

31 lines
940 B
YAML
Raw Normal View History

2023-09-18 21:34:29 +02:00
name: Deploy to Oracle Cloud
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
environment: oracle-cloud
steps:
2023-09-18 22:04:58 +02:00
- uses: actions/checkout@v3
2023-09-18 21:34:29 +02:00
- name: Create .env file
2023-09-18 22:04:58 +02:00
uses: SpicyPizza/create-envfile@v2
2023-09-18 21:34:29 +02:00
with:
2023-09-18 22:04:58 +02:00
envkey_DEBUG: true
envkey_DB_HOST: "db"
2023-09-18 21:34:29 +02:00
envkey_TOKEN: ${{ secrets.TOKEN }}
2023-09-19 21:24:30 +02:00
envkey_GOOGLE_APPLICATION_CREDENTIALS: "wulkanowy-gac.json"
- name: Create File
run: echo $GAC_CONTENT > wulkanowy-gac.json
env:
GAC_CONTENT: ${{ secrets.$GAC_CONTENT }}
2023-09-18 21:34:29 +02:00
- uses: alex-ac/github-action-ssh-docker-compose@master
name: Docker-Compose Remote Deployment
with:
ssh_host: ${{ secrets.ORACLE_CLOUD_SSH_HOST }}
ssh_private_key: ${{ secrets.ORACLE_CLOUD_SSH_PRIVATE_KEY }}
ssh_user: ${{ secrets.ORACLE_CLOUD_SSH_USER }}
docker_compose_prefix: schools