Repository navigation
update README with deployment info #22
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 bit-bot | |
| on: | |
| push: | |
| branches: [production] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set pipeline | |
| id: pipeline | |
| run: echo ::set-output name=pipeline::Production | |
| - uses: chrnorm/deployment-action@releases/v1 | |
| name: Create GitHub deployment | |
| id: deployment | |
| with: | |
| token: "${{ github.token }}" | |
| environment: ${{ steps.pipeline.outputs.pipeline }} | |
| target_url: "" | |
| - | |
| name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: bitsofgood/bit-bot:latest | |
| - name: Update deployment status (success) | |
| if: success() | |
| uses: chrnorm/deployment-status@releases/v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| target_url: ${{ steps.vercel_deploy.outputs.preview-url }} | |
| environment_url: ${{ steps.vercel_deploy.outputs.preview-url }} | |
| state: "success" | |
| deployment_id: ${{ steps.deployment.outputs.deployment_id }} | |
| - name: Update deployment status (failure) | |
| if: failure() | |
| uses: chrnorm/deployment-status@releases/v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| target_url: ${{ steps.vercel_deploy.outputs.preview-url }} | |
| environment_url: ${{ steps.vercel_deploy.outputs.preview-url }} | |
| state: "failure" | |
| deployment_id: ${{ steps.deployment.outputs.deployment_id }} |