Update definitions #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update definitions | |
# Run every 10 mins during Bungie's working hours. | |
# The Action takes ~10 seconds to run if there is no new manifest. | |
# Github give 2000 minutes (120_000 seconds) per month | |
on: | |
schedule: | |
- cron: "*/10 15-23 * * *" | |
- cron: "*/10 0-2 * * *" | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
TURBO_URL: ${{ secrets.TURBO_URL }} | |
TURBO_CODE: ${{ secrets.TURBO_CODE }} | |
permissions: | |
contents: read | |
deployments: write | |
name: Deploy | |
steps: | |
- uses: actions/[email protected] | |
- uses: oven-sh/setup-bun@v2 | |
- name: bun install | |
run: cd minifier && bun run next_gen.ts --check-manifest | |
shell: bash {0} | |
- name: copy json definitions | |
run: cd minifier && mv json ../native/public | |
- uses: pnpm/[email protected] | |
with: | |
version: 9.12.2 | |
- name: install dependencies | |
run: cd native && pnpm install --frozen-lockfile | |
- name: add .env file | |
run: cd native && echo '${{ secrets.CLIENT_SECRETS_WEB }}' > .env | |
- name: build # Plus workaround cloudflare not uploading the node_modules folder | |
run: | | |
cd native | |
pnpm expo export --source-maps --platform web | |
mv dist/assets/node_modules/* dist/assets/ | |
find dist/_expo/static/js/web/ -type f -print0 | xargs -0 sed -i 's/assets\/node_modules/assets/g' | |
- name: deploy website | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: gg-app | |
directory: native/dist | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |