Skip to content

Commit

Permalink
ci: deploy tiles gha
Browse files Browse the repository at this point in the history
  • Loading branch information
zackpollard committed Aug 22, 2024
1 parent be759b8 commit c997d13
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/deploy-tiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
- name: Copy latest tiles to R2
run: rclone --progress copyto pmtiles:/${{ steps.latest_build.outputs.KEY }} r2:/tiles/${{ steps.latest_build.outputs.KEY }} --s3-no-check-bucket --s3-chunk-size=64M --multi-thread-streams=50 --checkers=512

- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TF_APP_ID }}
private-key: ${{ secrets.TF_APP_PEM_FILE }}

- name: 'Checkout'
uses: actions/checkout@v4
with:
Expand All @@ -51,8 +58,9 @@ jobs:
sed -i -E 's/"pmtiles_file_name": "(.*)"/"pmtiles_file_name": "${{ steps.latest_build.outputs.KEY }}"/' deployment/modules/cloudflare/tiles/tiles.tfvars.json
- name: Push updated wrangler.toml to repo
uses: test-room-7/action-update-file@v1
uses: EndBug/add-and-commit@v9
with:
file-path: deployment/modules/cloudflare/tiles/tiles.tfvars.json
commit-msg: Update tile server file to ${{ steps.latest_build.outputs.KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
add: deployment/modules/cloudflare/tiles/tiles.tfvars.json
message: Update tile server file to ${{ steps.latest_build.outputs.KEY }}
ref: ${{ github.event.pull_request.head.ref }}
github-token: ${{ steps.generate-token.outputs.token }}

0 comments on commit c997d13

Please sign in to comment.