Update Custom Map #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Custom Map | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: Tag used to fetch spots | |
required: true | |
type: string | |
categories: | |
description: Map categories | |
type: choice | |
required: false | |
options: | |
- maps | |
- magazine | |
- filmer | |
- skater | |
- photographer | |
- video | |
- skatepark | |
- years | |
- shop | |
- greatest | |
- members | |
name: | |
type: string | |
required: false | |
subtitle: | |
type: string | |
required: false | |
edito: | |
type: string | |
required: false | |
about: | |
type: string | |
required: false | |
videos: | |
description: "URLs of videos (if multiple, separate them by commas: ',')" | |
type: string | |
required: false | |
env: | |
NEXT_PUBLIC_BUGSNAG_KEY: ${{ secrets.NEXT_PUBLIC_BUGSNAG_KEY }} | |
jobs: | |
update_map: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_PAT }} | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.1.6 | |
- name: Write map data | |
run: | | |
bun ./scripts/update_map.js \ | |
--tag ${{ inputs.tag }} \ | |
--name "${{ inputs.name }}" \ | |
--category "${{ inputs.categories }}" \ | |
--subtitle "${{ inputs.subtitle }}" \ | |
--edito "${{ inputs.edito }}" \ | |
--about "${{ inputs.about }}" \ | |
--videos "${{ inputs.videos }}" | |
- name: Write commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "['./apps/api/src/data/customMaps/_spots.json']" | |
default_author: user_info | |
message: 'feat: Map ${{inputs.tag}} updated' | |
- run: bun install --frozen-lockfile | |
- run: bun lint | |
- name: Deploying to Vercel | |
uses: amondnet/vercel-action@v25 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
vercel-args: --prod |