Skip to content

chore: move ConfigProvider to layout.tsx, as all pages need it (#3) #9

chore: move ConfigProvider to layout.tsx, as all pages need it (#3)

chore: move ConfigProvider to layout.tsx, as all pages need it (#3) #9

Workflow file for this run

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) }}