diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f0a52a3..9c0b182 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,16 +1,24 @@ name: Deploy Docs to GitHub Pages on: + # Runs on pushes targeting the default branch push: branches: - main workflow_dispatch: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: github-pages cancel-in-progress: false @@ -48,6 +56,7 @@ jobs: path: workspaces/docs/dist include-hidden-files: true + # Single deploy job since we're just deploying deploy: name: Deploy to GitHub Pages needs: build @@ -58,6 +67,14 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: workspaces/docs/dist + - name: Deploy artifact id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7b9e9ea --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Deploy Docs Typecheck + +on: + push: + branches: + - feature-v1.0b_mono + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + name: Build Expo docs + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install dependencies + run: npm i + + - name: Typecheck docs + run: npm run typecheck -w docs diff --git a/.nvmrc b/.nvmrc index 67e145b..c004e35 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.18.0 +v22.20.0 diff --git a/workspaces/docs/types/react-native-web.d.ts b/workspaces/docs/types/react-native-web.d.ts new file mode 100644 index 0000000..b5d9f13 --- /dev/null +++ b/workspaces/docs/types/react-native-web.d.ts @@ -0,0 +1,30 @@ +import 'react-native'; +import 'react-native/Libraries/Components/Pressable/Pressable'; +import 'react-native/Libraries/StyleSheet/StyleSheetTypes'; + +declare module 'react-native/Libraries/Components/Pressable/Pressable' { + interface PressableStateCallbackType { + readonly hovered?: boolean; + readonly focused?: boolean; + } +} + +declare module 'react-native/Libraries/StyleSheet/StyleSheetTypes' { + interface ViewStyle { + transitionDuration?: string | number; + transitionProperty?: string; + transitionTimingFunction?: string; + } + + interface TextStyle { + transitionDuration?: string | number; + transitionProperty?: string; + transitionTimingFunction?: string; + } + + interface ImageStyle { + transitionDuration?: string | number; + transitionProperty?: string; + transitionTimingFunction?: string; + } +}