Skip to content

Commit

Permalink
Merge pull request #1 from mniemcewicz/user-key-import
Browse files Browse the repository at this point in the history
User key import
  • Loading branch information
mniemcewicz authored Mar 28, 2024
2 parents 2886285 + d93d7f5 commit 376cb18
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Deploy Worker
name: Deploy Cloudflare Worker
on:
push:
pull_request:
repository_dispatch:
workflow_dispatch:

Expand All @@ -24,15 +22,13 @@ jobs:
if [ -z "$GATSBY_FLOTIQ_API_KEY" ]; then
echo "Flotiq API Key is not set, using a starter one." && echo "GATSBY_FLOTIQ_API_KEY=40accb088d028cb0779d8fc2ea7646e4" >> $GITHUB_ENV
else
echo "Using user-provided Flotiq API Key." && echo "GATSBY_FLOTIQ_API_KEY=$GATSBY_FLOTIQ_API_KEY" >> $GITHUB_ENV
echo "Using user-provided Flotiq API Key. Importing starter data to Flotiq." && echo "GATSBY_FLOTIQ_API_KEY=$GATSBY_FLOTIQ_API_KEY" >> $GITHUB_ENV
npm install -g flotiq-cli
flotiq import . $GATSBY_FLOTIQ_API_KEY
fi
- run: npm install -g gatsby-cli
- run: npm install -g flotiq-cli
# - run: flotiq import . $GATSBY_FLOTIQ_API_KEY
- run: yarn install
- run: gatsby build
# env:
# GATSBY_FLOTIQ_API_KEY: ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ Or to [Netlify](https://www.netlify.com/):

[![Deploy](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/flotiq/flotiq-gatsby-event-1)

Or [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/mniemcewicz/flotiq-gatsby-event-1)
Or to [Cloudflare Workers](https://workers.cloudflare.com/):

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/mniemcewicz/flotiq-gatsby-event-1)

## What's inside?

A quick look at the top-level files and directories you'll see in a Gatsby project.
Expand Down Expand Up @@ -144,6 +147,8 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje
├── README.md
├── static.json
├── tailwind.config.js
├── worker-index.js
├── wrangler.toml
└── yarn.lock

1. **`.flotiq`**: This directory contains content types necessary to starter to work.
Expand Down Expand Up @@ -198,7 +203,11 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje

26. **`tailwind.config.js`**: Configuration file for tailwind.

27. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your yarn dependencies that were installed for your project. **(You won’t change this file directly).**
27. **`worker-index.js`**: Main file for Cloudflare Workers.

28. **`wrangler.toml`**: Configuration file for Cloudflare Workers deployment.

29. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your yarn dependencies that were installed for your project. **(You won’t change this file directly).**

## Learning Gatsby

Expand All @@ -218,5 +227,4 @@ Documentation for gatsby starters is [here](https://flotiq.com/docs/Universe/gat

If you wish to talk with us about this project, feel free to hop on our [![Discord Chat](https://img.shields.io/discord/682699728454025410.svg)](https://discord.gg/FwXcHnX).

If you found a bug, please report it in [issues](https://github.com/flotiq/flotiq-gatsby-event-1/issues).

If you found a bug, please report it in [issues](https://github.com/flotiq/flotiq-gatsby-event-1/issues).
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "gatsby-event-1"
name = "flotiq-gatsby-event-1"
main = "worker-index.js"
compatibility_date = "2024-03-27"
workers_dev = true
Expand Down

0 comments on commit 376cb18

Please sign in to comment.