Skip to content

Commit

Permalink
Provides a way to trigger production CDN builds from master every time
Browse files Browse the repository at this point in the history
  • Loading branch information
danielxvu committed Oct 2, 2023
1 parent 0c908f0 commit 96d2d90
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Forces-updates all releases in production

on:
release:
types: [created]

env:
NPM_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

jobs:
deployment:
environment: production
runs-on: ubuntu-latest
env:
CDN_SHEETS_FOLDER: ${{ vars.CDN_SHEETS_FOLDER }}
steps:
- uses: actions/checkout@v3
with:
ref: master

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.SHEET_HTTP_GCP_KEYFILE }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'

- name: 'Use gcloud CLI'
run: 'gcloud info'
- uses: oven-sh/setup-bun@v1

- run: bun install
working-directory: contrib/sheet-pixie

# Handles when a force-update has been requested (meaning all sheets will be re-built and deployed)
- run: make all
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
- run: gcloud storage rsync --project=roll20-actual ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }} gs://roll20-cdn/${{ env.CDN_SHEETS_FOLDER }} --delete-unmatched-destination-objects --cache-control='no-cache' --recursive
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}

0 comments on commit 96d2d90

Please sign in to comment.