diff --git a/.github/workflows/continuous-deploy.yml b/.github/workflows/continuous-deploy.yml index f1aaf66f..6f11eeff 100644 --- a/.github/workflows/continuous-deploy.yml +++ b/.github/workflows/continuous-deploy.yml @@ -7,10 +7,27 @@ on: - completed jobs: + get-default-branch: + runs-on: ubuntu-latest + outputs: + isDefault: ${{ steps.check.outputs.isDefault }} + steps: + - name: Check if current branch is default + id: check + run: | + DEFAULT_BRANCH=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }} | jq -r '.default_branch') + IS_DEFAULT=false + if [ "$DEFAULT_BRANCH" = "${{ github.ref }}" ]; then + IS_DEFAULT=true + fi + echo "::set-output name=isDefault::$IS_DEFAULT" + deploy-to-cloudflare: name: Deploy to Cloudflare Pages if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: ubiquity/.github/.github/workflows/deploy.yml@main + with: + deploy_preview_branches: ${{ needs.get-default-branch.outputs.isDefault }} permissions: contents: read pull-requests: write @@ -18,4 +35,4 @@ jobs: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} APP_ID: ${{ secrets.APP_ID }} - APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} \ No newline at end of file + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/static/audit.html b/static/audit.html index a400d9d6..192f814e 100644 --- a/static/audit.html +++ b/static/audit.html @@ -1,70 +1,73 @@ +
+