Add social auth #18
This file contains hidden or 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: Deploy Environments | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| # Used only for "job.environment" setting. | |
| # Must match $DDEV_PROJECT_NAME.$DDEV_PROJECT_TLD for github environment links to work. | |
| # @TODO: Update when on live server. | |
| # DDEV_PROJECT_DOMAIN: ${{ github.event.repository.name }}.pr${{ github.event.number }}.local.computer | |
| # DDEV_PROJECT_PATH: "Sites/${{ github.repository }}/" | |
| # Just to make sure the github runner user's PATH is set right. | |
| PATH: /usr/bin:/usr/local/bin:/snap/bin | |
| jobs: | |
| deploy: | |
| name: Deploy to ${{ matrix.name }} | |
| environment: | |
| name: ${{ matrix.project }}.${{ matrix.name }} | |
| url: http://${{ matrix.domain }} | |
| # @TODO: Launch live runner. | |
| # runs-on: live | |
| runs-on: platform@prod.servers.thinkdrop.net | |
| # Use a matrix for deploying multiple sites. | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: live | |
| project: launchpad | |
| path: "Sites/${{ github.repository }}/live" | |
| domain: "launchpad.thinkdrop.net" | |
| domains: "launchpad.thinkdrop.net" | |
| git_reference: "main" | |
| runner: platform@prod.servers.thinkdrop.net | |
| # - name: dev | |
| # path: "Sites/${{ github.repository }}/dev" | |
| # domains: "dev.thinkdrop.net" | |
| # git_reference: main | |
| steps: | |
| - name: Set Environment variables | |
| run: | | |
| cd /var/platform/${{ matrix.path }} | |
| echo "# Generated by deploy.yml" > .env | |
| echo "LAUNCHPAD_SITE_MANAGER_DOMAIN=${{ matrix.domain }}" >> .env | |
| - name: Deploy site | |
| uses: operations-project/site-runner-ddev@main | |
| with: | |
| git-reference: ${{ matrix.git_reference }} | |
| path: ${{ matrix.path }} | |
| # While we are still hosted elsewhere, the live site should be synced. | |
| # sync: "yes" | |
| # Remove this after the env is created so live sites don't run ddev start. | |
| ddev-start: "true" | |
| ddev-project-name: "${{ matrix.project }}.${{ matrix.name }}" | |
| ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| ddev-fqdns: ${{ matrix.domains }} | |
| ddev-project-tld: ${{ matrix.domain }} |