Skip to content

Commit

Permalink
chore: fail netlify, consolidate graphiql webpack examples (#2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Nov 13, 2021
1 parent 0d3ff90 commit 25fb5c5
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 174 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ jobs:
enable-commit-comment: true
overwrites-pull-request-comment: true
functions-dir: functions
github-deployment-environment: "graphiql-1"
github-deployment-environment: "graphiql-cdn-preview"
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.SITE_ID }}
timeout-minutes: 1
# monaco-graphql deploy preview
Expand All @@ -60,14 +61,15 @@ jobs:
- name: Deploy Monaco GraphQL Example to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './examples/monaco-graphql-webpack/bundle'
publish-dir: './examples/monaco-graphql-webpack/dist'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Monaco GraphQL Preview"
functions-dir: functions
github-deployment-environment: "monaco-graphql"
deploy-message: "Monaco GraphQL Webpack Preview"
github-deployment-environment: "monaco-graphql-webpack-preview"
github-deployment-description: "A vanilla js github explorer example of `monaco-graphql` using webpack"
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: 46a6b3c8-992f-4623-9a76-f1bd5d40505c
timeout-minutes: 1
# Test the webpack + typescript + react consuming build
Expand All @@ -84,19 +86,20 @@ jobs:
- name: Build
run: yarn build & yarn build-bundles

- name: Build Webpack Example
- name: Build GraphiQL Webpack Example
run: yarn workspace example-graphiql-webpack run build-demo

- name: Deploy Webpack Example to Netlify
- name: Deploy GraphiQL Webpack Example to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './examples/graphiql-webpack/dist'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "GraphiQL Webpack Example"
functions-dir: functions
github-deployment-environment: "graphiql-webpack"
github-deployment-environment: "graphiql-webpack-preview"
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: aabca80b-fe63-43df-83ef-e431876560c9
timeout-minutes: 1
10 changes: 0 additions & 10 deletions examples/graphiql-cdn-create-fetcher/README.md

This file was deleted.

71 changes: 0 additions & 71 deletions examples/graphiql-cdn-create-fetcher/index.html

This file was deleted.

10 changes: 0 additions & 10 deletions examples/graphiql-cdn-create-fetcher/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions examples/graphiql-create-fetcher/README.md

This file was deleted.

1 change: 0 additions & 1 deletion examples/graphiql-create-fetcher/babel.config.js

This file was deleted.

34 changes: 0 additions & 34 deletions examples/graphiql-create-fetcher/package.json

This file was deleted.

25 changes: 0 additions & 25 deletions examples/graphiql-create-fetcher/src/index.html.ejs

This file was deleted.

1 change: 0 additions & 1 deletion examples/graphiql-create-fetcher/webpack.config.js

This file was deleted.

1 change: 1 addition & 0 deletions examples/graphiql-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"graphiql": "file:../../packages/graphiql",
"@graphiql/toolkit": "file:../../packages/graphiql-toolkit",
"graphql": "16.0.0-experimental-stream-defer.5",
"react": "17.0.2"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/monaco-graphql-webpack/src/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
padding: .5em 1em;
}
</style>
<script src="https://unpkg.com/netlify-auth-providers"></script>

</head>

<body style="margin: 0; padding: 0;">
<div style="display: flex;">
<div class="full-height column">
Expand All @@ -49,5 +48,7 @@
aria-atomic="true"
></div>
</div>
<!-- for github auth -->
<script src="https://unpkg.com/netlify-auth-providers"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/monaco-graphql-webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const resultConfig = {
entry: './index.ts',
context: rootPath('src'),
output: {
path: rootPath('bundle'),
path: rootPath('dist'),
filename: '[name].js',
globalObject: 'self',
},
Expand Down

2 comments on commit 25fb5c5

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.