-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (54 loc) · 1.68 KB
/
from-figma.yaml
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
name: From Figma
on:
workflow_dispatch:
inputs:
fileKey:
description: Figma file key
type: string
required: true
page:
description: Stringified selected page (id, name)
type: string
default: '{}'
required: true
selection:
description: Stringified array of the selected nodes (id, name)
type: string
default: '[]'
required: true
jobs:
export:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Transform Inputs 🧬
id: transformInputs
uses: ./.github/actions/transform-inputs
with:
fileKey: ${{ github.event.inputs.fileKey }}
page: ${{ github.event.inputs.page }}
selection: ${{ github.event.inputs.selection }}
- name: Figma Export PDFs 🦾
id: figmaExportPdfs
uses: ./
with:
accessToken: ${{ secrets.FIGMA_ACCESS_TOKEN }}
fileKey: ${{ steps.transformInputs.outputs.fileKey }}
ids: ${{ steps.transformInputs.outputs.ids }}
- name: Log ℹ️
run: |
echo "Results"
echo "pdfs: $pdfs"
echo "outDir: $outDir"
env:
pdfs: ${{ steps.figmaExportPdfs.outputs.pdfs }}
outDir: ${{ steps.figmaExportPdfs.outputs.outDir }}
- name: Upload 📂
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ${{ steps.figmaExportPdfs.outputs.outDir }}
server-dir: ./pdf-test/