This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (84 loc) · 3.4 KB
/
plasmic.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
81
82
83
84
85
86
87
# Plasmic workflow v4
name: Sync, build and deploy Plasmic app
permissions:
contents: write
pages: write
pull-requests: write
on:
repository_dispatch:
types: [plasmic]
jobs:
job:
name: Sync, build and deploy
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checking out repository...
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- id: node
name: Setting up node v18...
uses: actions/setup-node@v3
with:
node-version: "18"
- id: cache
name: Recovering cache...
uses: actions/cache@v2
with:
key: lock-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}
path: ${{ github.event.client_payload.data.directory }}/node_modules
- id: init
name: Initializing Plasmic app...
uses: plasmicapp/plasmic-action@master
with:
run: init
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.client_payload.data.branch }}
directory: ${{ github.event.client_payload.data.directory }}
project_id: ${{ github.event.client_payload.data.projectId }}
project_api_token: ${{ github.event.client_payload.data.projectApiToken }}
platform: ${{ github.event.client_payload.data.platform }}
language: ${{ github.event.client_payload.data.language }}
scheme: ${{ github.event.client_payload.data.scheme }}
title: ${{ github.event.client_payload.data.title }}
description: ${{ github.event.client_payload.data.description }}
- id: sync
name: Syncing Plasmic project...
if: ${{ github.event.client_payload.data.scheme == 'codegen' && steps.init.outputs.synced != 'true' }}
uses: plasmicapp/plasmic-action@master
with:
run: sync
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.client_payload.data.branch }}
directory: ${{ github.event.client_payload.data.directory }}
project_id: ${{ github.event.client_payload.data.projectId }}
project_api_token: ${{ github.event.client_payload.data.projectApiToken }}
sync_action: ${{ github.event.client_payload.data.syncAction }}
title: ${{ github.event.client_payload.data.title }}
description: ${{ github.event.client_payload.data.description }}
- id: build
name: Building Plasmic app...
if: ${{ github.event.client_payload.data.publish }}
uses: plasmicapp/plasmic-action@master
with:
run: build
branch: ${{ github.event.client_payload.data.branch }}
directory: ${{ github.event.client_payload.data.directory }}
platform: ${{ github.event.client_payload.data.platform }}
- id: gh-pages
name: Publishing to GitHub Pages...
uses: JamesIves/[email protected]
if: ${{ steps.build.outputs.publish_dir }}
with:
branch: gh-pages
folder: ${{ steps.build.outputs.publish_dir }}
- id: pr
name: Creating pull request...
uses: repo-sync/pull-request@v2
if: ${{ steps.sync.outputs.new_branch }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: ${{ steps.sync.outputs.new_branch }}
destination_branch: ${{ github.event.client_payload.data.branch }}