Skip to content

Commit

Permalink
Re-enable 90 seconds and index fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulochang committed Feb 22, 2024
1 parent ee07c8f commit 71e346c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/push-permissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: |
echo "Full payload: ${{ toJson(github.event) }}"
echo "Status: ${{ github.event.client_payload.status }}"
echo "Path: ${{ github.event.client_payload.path }}"
encodedUri=$(echo -n "${{ steps.removeMd.outputs.replaced }}" | jq --slurp --raw-input --raw-output @uri)
Expand All @@ -21,14 +20,14 @@ jobs:
if: (github.event.client_payload.status == 200 || github.event.client_payload.status == 204) && endsWith(github.event.client_payload.path, '.md')
runs-on: ubuntu-latest
steps:
# - name: Sleep for 90 seconds assuming query-index-search.json will be updated before
# run: sleep 90s
# shell: bash
- name: Sleep for 90 seconds assuming query-index-search.json will be updated before
run: sleep 90s
shell: bash
- name: Remove .md extension
id: removeMd
uses: frabert/replace-string-action@v2
with:
pattern: '\.md$'
pattern: '(index)?\.md$'
string: ${{ github.event.client_payload.path }}
replace-with: ''
- name: Find page JSON
Expand All @@ -47,7 +46,7 @@ jobs:
encodedUri=$(echo -n "${{ steps.removeMd.outputs.replaced }}" | jq --slurp --raw-input --raw-output @uri)
echo "finished"
echo "Done"
basePath="https://api.cloudflare.com/client/v4/accounts/${{ vars.CF_ACCOUNT_ID }}/storage/kv/namespaces/${{ vars.CF_KV_NAMESPACE_ID }}/values/"
keyPath=$basePath$encodedUri
Expand All @@ -59,4 +58,4 @@ jobs:
--header "Authorization: Bearer ${{ secrets.CF_BEARER_TOKEN }}" \
--header 'Content-Type: multipart/form-data' \
--form 'metadata={}' \
--form "value=$role"
--form "value=$role"

0 comments on commit 71e346c

Please sign in to comment.