forked from storyblok/wordpress-importer
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.32 KB
/
migrate.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
name: Migrate
run-name: Migration started by ${{ github.actor }}
on:
workflow_dispatch
env:
STORYBLOK_OAUTH_TOKEN: ${{ secrets.STORYBLOK_OAUTH_TOKEN }}
STORYBLOK_SPACE_ID: ${{ secrets.STORYBLOK_SPACE_ID }}
STORYBLOK_REGION: ${{ secrets.STORYBLOK_REGION }}
WP_BASE_URL: ${{ secrets.WP_BASE_URL }}
WP_ADMIN_USERNAME: ${{ secrets.WP_ADMIN_USERNAME }}
WP_ADMIN_PASSWORD: ${{ secrets.WP_ADMIN_PASSWORD }}
RICH_TEXT_COMPONENT_NAME: ${{ secrets.RICH_TEXT_COMPONENT_NAME }}
EDITORIAL_GUIDELINES_UUID: ${{ secrets.EDITORIAL_GUIDELINES_UUID }}
MIGRATION_PLAN_FILE_CONTENTS: ${{ secrets.MIGRATION_PLAN_FILE_CONTENTS }}
jobs:
Migrate-WordPress-To-Storyblok:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install specified node version
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- run: |
npm install
- name: Create migration plan file from secret
run: |
echo -n "$MIGRATION_PLAN_FILE_CONTENTS" > migration_plan.csv
- name: Fetch TablePress export
run: |
npm run fetch-tablepress-tables
- name: Fetch media JSON
run: |
npm run fetch-media-json
- name: Run the main migration
run: |
npm run migrate