fix: make routes static #2
This file contains hidden or 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: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- dev | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
deployments: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | |
restore-keys: ${{ runner.os }}-bun- | |
- name: Install Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun i | |
- name: Build | |
env: | |
RV_API_URL: ${{ vars.RV_API_URL }} | |
RV_GOOGLE_TAG_MANAGER_ID: ${{ vars.RV_GOOGLE_TAG_MANAGER_ID }} | |
RV_DMCA_GUID: ${{ vars.RV_DMCA_GUID }} | |
run: bun run build | |
- name: Deploy | |
id: deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
command: pages deploy build --project-name=revanced-counterfeits | |
- name: Comment deployment URL on Pull Request | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: Deployed at ${{ steps.deploy.outputs.deployment-url }}. | |
- name: Comment deployment URL on Commit | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
uses: peter-evans/commit-comment@v3 | |
with: | |
body: Deployed at ${{ steps.deploy.outputs.deployment-url }}. |