name: deploy on: repository_dispatch: types: [trigger-ocelot-brand-build-success] jobs: deploy: # see example https://github.com/do-community/example-doctl-action # see example https://github.com/do-community/example-doctl-action/blob/main/.github/workflows/workflow.yaml name: Deploy defined version to stage.ocelot.social cluster at DigitalOcean runs-on: ubuntu-latest env: SECRET: ${{ secrets.SECRET }} CONFIGURATION: "this" steps: - name: Checkout code uses: actions/checkout@v3 - name: Decrypt .env run: gpg --quiet --batch --yes --decrypt --passphrase="${SECRET}" --output .env .env.enc - name: Load .env uses: aarcangeli/load-dotenv@v1.0.0 with: quiet: true - name: Checkout Ocelot code uses: actions/checkout@v3 with: repository: 'Ocelot-Social-Community/Ocelot-Social' ref: ${{ env.GITHUB_OCELOT_REF }} path: 'ocelot/' fetch-depth: 0 - name: Checkout code uses: actions/checkout@v3 with: path: "ocelot/deployment/configurations/${{ env.CONFIGURATION }}" - name: Decrypt all secrets run: ocelot/deployment/scripts/secrets.decrypt.sh - name: Upgrade Cluster run: ocelot/deployment/scripts/cluster.upgrade.sh - name: Reset and seed Neo4j database run: ocelot/deployment/scripts/cluster.reseed.sh