Skip to content

Merge pull request #20 from GrantBirki/test #25

Merge pull request #20 from GrantBirki/test

Merge pull request #20 from GrantBirki/test #25

Workflow file for this run

name: deploy
on:
push:
branches:
- main
permissions:
contents: read
jobs:
deployment-check:
runs-on: ubuntu-latest
outputs: # set outputs for use in downstream jobs
continue: ${{ steps.deployment-check.outputs.continue }}
sha: ${{ steps.deployment-check.outputs.sha }}
steps:
# https://github.com/github/branch-deploy/blob/d3c24bd92505e623615b75ffdfac5ed5259adbdb/docs/merge-commit-strategy.md
- name: deployment check
uses: github/branch-deploy@v10
id: deployment-check
with:
merge_deploy_mode: "true"
environment: production
deploy:
if: ${{ needs.deployment-check.outputs.continue == 'true' && github.event_name == 'push' }}
needs: deployment-check
environment: production
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.deployment-check.outputs.sha }}
- name: install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
cache: "poetry"
- name: install dependencies
run: poetry install
- uses: grantbirki/octodns-action@v1
id: octodns
with:
config_path: production.yaml
doit: '--doit'
poetry: true
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
- name: view log output
run: echo "${{ steps.octodns.outputs.log }}"
if: ${{ steps.octodns.outputs.log != '' }}
continue-on-error: true