30 lines
940 B
YAML
30 lines
940 B
YAML
name: Deploy to Oracle Cloud
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
environment: oracle-cloud
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Create .env file
|
|
uses: SpicyPizza/create-envfile@v2
|
|
with:
|
|
envkey_DEBUG: true
|
|
envkey_DB_HOST: "db"
|
|
envkey_TOKEN: ${{ secrets.TOKEN }}
|
|
envkey_GOOGLE_APPLICATION_CREDENTIALS: "wulkanowy-gac.json"
|
|
- name: Create File
|
|
run: echo $GAC_CONTENT > wulkanowy-gac.json
|
|
env:
|
|
GAC_CONTENT: ${{ secrets.$GAC_CONTENT }}
|
|
- 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
|