Skip to content

Commit

Permalink
Merge branch 'weapon-convergence' of https://github.com/the-hideout/t…
Browse files Browse the repository at this point in the history
…arkov-data-api into weapon-convergence
  • Loading branch information
Razzmatazzz committed Mar 16, 2023
2 parents 1f03086 + 65cd985 commit e311fa8
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 16 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/branch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,31 @@ jobs:

steps:

- uses: github/branch-deploy@e0b8fec9f3b1c48ea3dddeedca59af02e4d69a53 # [email protected].0
- uses: github/branch-deploy@v5.1.0
id: branch-deploy
with:
admins: the-hideout/core-contributors
admins_pat: ${{ secrets.BRANCH_DEPLOY_ADMINS_PAT }}
environment_targets: production,development
environment_urls: production|https://api.tarkov.dev/graphql,development|https://dev-api.tarkov.dev/graphql

- name: Checkout
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/checkout@v3 # pin@v3
uses: actions/checkout@v3.3.0
with:
ref: ${{ steps.branch-deploy.outputs.ref }}

- name: Use Node.js 16
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/setup-node@v3 # pin@v3
uses: actions/setup-node@v3.6.0
with:
node-version: 16
cache: npm

- name: Install dependencies
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
run: npm ci

- name: Test
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: script/test

- name: Publish - Development
if: ${{ steps.branch-deploy.outputs.environment == 'development' &&
steps.branch-deploy.outputs.noop != 'true' &&
Expand All @@ -67,7 +64,7 @@ jobs:
The API has been **deployed** to the **development** environment 🚀
- Endpoint: \`dev-api.tarkov.dev\`
- Playground: [dev-api.tarkov.dev/___graphql](https://dev-api.tarkov.dev/___graphql)
- Playground: [dev-api.tarkov.dev/___graphql](https://dev-api.tarkov.dev/graphql)
> Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`;
Expand All @@ -91,6 +88,6 @@ jobs:
The API has been **deployed** to the **production** environment 🚀
- Endpoint: \`api.tarkov.dev\`
- Playground: [api.tarkov.dev/___graphql](https://api.tarkov.dev/___graphql)
- Playground: [api.tarkov.dev/___graphql](https://api.tarkov.dev/graphql)
> Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`;
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3 # pin@v3
uses: actions/checkout@v3.3.0

- name: Use Node.js 16
uses: actions/setup-node@v3 # pin@v3
uses: actions/setup-node@v3.6.0
with:
node-version: 16
cache: npm

- name: Publish - Production
uses: cloudflare/wrangler-action@3424d15af26edad39d5276be3cc0cc9ffec22b55 # [email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/new-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:

steps:
# Comment on new PR requests with deployment instructions
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2
- uses: actions/checkout@v3.3.0
- name: comment
uses: GrantBirki/comment@5f428382792637d756694f5e0ca49ba56354125c # pin@v2.0.0
uses: GrantBirki/[email protected].3
continue-on-error: true
with:
file: .github/new-pr-comment.md
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: test

on:
push:
branches:
- main
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]

- name: Use Node.js 16
uses: actions/[email protected]
with:
node-version: 16
cache: npm

- run: npm ci

- name: test
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: script/test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ worker/
.cargo-ok
dist/
.env
.vscode/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tarkov API (Escape from Tarkov) 💻

[![deploy](https://github.com/the-hideout/tarkov-data-api/actions/workflows/deploy.yml/badge.svg)](https://github.com/the-hideout/tarkov-data-api/actions/workflows/deploy.yml) [![Discord](https://img.shields.io/discord/956236955815907388?color=7388DA&label=Discord)](https://discord.gg/XPAsKGHSzH)
[![deploy](https://github.com/the-hideout/tarkov-data-api/actions/workflows/deploy.yml/badge.svg)](https://github.com/the-hideout/tarkov-data-api/actions/workflows/deploy.yml) [![test](https://github.com/the-hideout/tarkov-api/actions/workflows/test.yml/badge.svg)](https://github.com/the-hideout/tarkov-api/actions/workflows/test.yml) [![Discord](https://img.shields.io/discord/956236955815907388?color=7388DA&label=Discord)](https://discord.gg/XPAsKGHSzH)

This is the main API for [tarkov.dev](https://tarkov.dev), and was forked from kokarn's Tarkov Tools API.

Expand Down

0 comments on commit e311fa8

Please sign in to comment.