Skip to content

Import Ship JSON files from Notion #1

Import Ship JSON files from Notion

Import Ship JSON files from Notion #1

Workflow file for this run

# Import ship JSON files from Notion
name: Import Ship JSON files from Notion
on:
workflow_dispatch:
inputs:
ship_name:
description: The specific ship to update (leave blank for all ships)
default: ''
required: false
type: string
permissions:
contents: write
pull-requests: write
jobs:
import:
runs-on: ubuntu-latest
steps:
# Setup the runtime environment
- uses: actions/checkout@v4
- name: Setup dependencies
working-directory: scripts/notion-import
run: |
npm install
# Import the data from Notion
- name: Import ship data
working-directory: scripts/notion-import
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
run: |
npm run import ${{ inputs.ship_name }}
#
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
add-paths: data/ships/*.json
branch: action/update-ship-json
commit-message: "auto-commit: import ship json files"
# Auto-generated pull request details
title: Update Ship JSON Files
body: |
Manually-triggered import of Ship JSON files from [Notion][1].
Auto-generated by the [import-ships Github Action][2].
[1]: https://bszlrd.notion.site/Pioneer-redesign-dashboard-b0ffc505ff3c4302b6ee873d75319c75
[2]: https://github.com/pioneerspacesim/pioneer/actions/workflows/import-ships.yml
reviewers: bszlrd