Skip to content

Commit

Permalink
Update and rename deploy_worker.yml to deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mniemcewicz authored Mar 28, 2024
1 parent 8b6fbc9 commit 2886285
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
pull_request:
repository_dispatch:
workflow_dispatch:

jobs:
deploy:
Expand All @@ -16,17 +17,24 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Check if Flotiq API key is set
run: [ -z "$GATSBY_FLOTIQ_API_KEY" ] && echo "Flotiq API Key is not set, using a starter one." && GATSBY_FLOTIQ_API_KEY="40accb088d028cb0779d8fc2ea7646e4" || true
- name: Check if Flotiq API key is set.
env:
GATSBY_FLOTIQ_API_KEY: ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
run: |
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
fi
- run: npm install -g gatsby-cli
- run: npm install -g flotiq-cli
- run: flotiq import . ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
# - run: flotiq import . $GATSBY_FLOTIQ_API_KEY
- run: yarn install
- run: gatsby build
env:
GATSBY_FLOTIQ_API_KEY: ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
# env:
# GATSBY_FLOTIQ_API_KEY: ${{ secrets.GATSBY_FLOTIQ_API_KEY }}
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}

0 comments on commit 2886285

Please sign in to comment.