Skip to content

Commit b14fc64

Browse files
feat: create action.yml
1 parent 809500f commit b14fc64

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Diff for: action.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Monkeytype Readme"
2+
description: "A GitHub Action to generate Monkeytype Readme SVGs, let you share Monkeytype story with the world."
3+
branding:
4+
icon: 'bookmark'
5+
color: 'yellow'
6+
inputs:
7+
username:
8+
description: "Your Monkeytype username"
9+
required: true
10+
themes:
11+
description: "Themes to generate SVGs for"
12+
required: true
13+
target-branch:
14+
description: "Branch to deploy Monkeytype Readme SVGs"
15+
required: true
16+
github-token:
17+
description: "GitHub token use to deploy github pages"
18+
required: true
19+
20+
runs:
21+
using: 'composite'
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: "16.x"
30+
31+
- name: Download SVG
32+
shell: bash
33+
run: |
34+
mkdir monkeytype-readme-svg
35+
curl -o monkeytype-readme-svg/${{ inputs.username }}-monkeytype-readme.svg https://monkeytype-readme.zeabur.app/generate-svg/${{ inputs.username }}/${{ inputs.themes }}
36+
curl -o monkeytype-readme-svg/${{ inputs.username }}-monkeytype-readme-lb.svg https://monkeytype-readme.zeabur.app/generate-svg/${{ inputs.username }}/${{ inputs.themes }}?lb=true
37+
curl -o monkeytype-readme-svg/${{ inputs.username }}-monkeytype-readme-pb.svg https://monkeytype-readme.zeabur.app/generate-svg/${{ inputs.username }}/${{ inputs.themes }}?pb=true
38+
curl -o monkeytype-readme-svg/${{ inputs.username }}-monkeytype-readme-lb-pb.svg https://monkeytype-readme.zeabur.app/generate-svg/${{ inputs.username }}/${{ inputs.themes }}?lbpb=true
39+
40+
- name: push monkeytype-readme.svg to the monkeytype-readme branch
41+
uses: crazy-max/[email protected]
42+
with:
43+
target_branch: ${{ inputs.target-branch }}
44+
build_dir: monkeytype-readme-svg
45+
env:
46+
GITHUB_TOKEN: ${{ inputs.github-token }}

0 commit comments

Comments
 (0)