-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1.08 KB
/
jsfiddle.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
name: Node.js CI
on: [push]
env:
JSFIDDLE_REPO: neptunelabs/fsi-jsfiddle-samples
jobs:
publish-jsfiddle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Build JSFiddle Demos
run: |
npm install
node ./node_modules/@neptunelabs/fsi-samples-framework/jsfiddle-builder.js
- name: Pushes JSFiddle files
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.JSFIDDLE_GITHUB_TOKEN }}
with:
source_file: ${{ github.event.repository.name }}
destination_repo: ${{ env.JSFIDDLE_REPO }}
user_email: '[email protected]'
user_name: 'neptunelabs'
commit_message: 'JSFiddle commit'
destination_branch: 'master'