Skip to content

Commit

Permalink
feat: migrate remix-netlify adapter (#83)
Browse files Browse the repository at this point in the history
Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
  • Loading branch information
3 people authored Jul 19, 2023
1 parent f444e63 commit cdab2fe
Show file tree
Hide file tree
Showing 38 changed files with 1,611 additions and 12,310 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/cypress-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Run e2e (Remix Demo)
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
jobs:
cypress:
name: Cypress
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Generate Github token
uses: navikt/github-app-token-generator@v1
id: get-token
with:
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
app-id: ${{ secrets.TOKENS_APP_ID }}

- name: Checkout @netlify/wait-for-deploy-action
uses: actions/checkout@v3
with:
repository: netlify/wait-for-deploy-action
token: ${{ steps.get-token.outputs.token }}
path: ./.github/actions/wait-for-netlify-deploy

- name: Wait for Netlify Deploy
id: deploy
uses: ./.github/actions/wait-for-netlify-deploy
with:
site-name: remix-serverless
timeout: 300

- name: Deploy successful
if: ${{ steps.deploy.outputs.origin-url }}
run: echo ${{ steps.deploy.outputs.origin-url }}

- name: Node
uses: actions/setup-node@v3
with:
node-version: '16'

- run: npm install

- name: Cypress run
if: ${{ steps.deploy.outputs.origin-url }}
id: cypress
uses: cypress-io/github-action@v2
with:
browser: chrome
headless: true
record: true
parallel: true
config-file: cypress/config/edge-cypress.config.ts
group: 'Remix Serverless Demo'
env:
DEBUG: '@cypress/github-action'
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}
CYPRESS_NETLIFY_CONTEXT: ${{ steps.deploy.outputs.context }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.REMIX_EDGE_CYPRESS_RECORD_KEY }}
4 changes: 4 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ jobs:
if: ${{ steps.release.outputs['packages/remix-runtime--version'] }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/remix-adapter/
if: ${{ steps.release.outputs['packages/remix-adapter--version'] }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ build/

# Local Netlify folder
.netlify

.ds_store
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"packages/remix-edge-adapter":"2.0.0","packages/remix-runtime":"1.1.0"}
{ "packages/remix-edge-adapter": "2.0.0", "packages/remix-runtime": "1.1.0" }
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ This project is not a template for Remix apps. It is a set of packages used by t

The project is a monorepo. Packages are located in the `packages` directory. There are three packages:

- `@netlify/remix-adapter` - The Remix adapter for Netlify Functions
- `remix-demo-site` - A demo site for testing the remix-adapter
- `@netlify/remix-runtime` - The Remix runtime for Netlify Edge Functions
- `@netlify/remix-edge-adapter` - The Remix adapter for Netlify Edge Functions
- `remix-edge-demo-site` - A demo site for testing the packages
- `remix-edge-demo-site` - A demo site for testing the remix-edge-adapter

## Installation

```bash
npm install
```

This installs all the dependencies for all the packages and builds the `@netlify/remix-runtime` and
`@netlify/remix-edge-adapter` packages.
This installs all the dependencies for all the packages and builds the `@netlify/remix-runtime`,
`@netlify/remix-adapter`, and `@netlify/remix-edge-adapter` packages.

## Development

Expand Down
Loading

0 comments on commit cdab2fe

Please sign in to comment.