fix: prevent prefetching all STR_ links in view (#5) #13
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request_target: | |
branches: | |
- main | |
jobs: | |
website: | |
name: Publish website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: https://npm.pkg.github.com | |
scope: "@openttd" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build website | |
run: | | |
NEXT_PUBLIC_LOCATION_NILE_DATA=https://nile-data-preview.openttd.org LOCATION_NILE_CONFIG=https://raw.githubusercontent.com/OpenTTD/nile-config/main/ npm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
id: pages | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }} | |
directory: dist | |
branch: ${{ github.event_name == 'push' && github.ref_name || format('pr/{0}', github.event.pull_request.number) }} |