-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (78 loc) · 2.62 KB
/
create-custom-map.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Create Custom Map
on:
workflow_dispatch:
inputs:
tag:
description: Tag used to fetch spots
required: true
type: string
categories:
description: Map categories
type: choice
required: true
default: 'maps'
options:
- maps
- magazine
- filmer
- skater
- photographer
- video
- skatepark
- years
- shop
name:
type: string
required: true
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:
create_map:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v2
with:
node-version: 18
cache: pnpm
- name: Write map data
run: |
node ./scripts/create_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: "['./data/customMaps/_spots.json']"
default_author: user_info
message: 'feat: Add new map'
- run: pnpm install --frozen-lockfile
- run: pnpm 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