-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy-docs.yml
50 lines (40 loc) · 1.21 KB
/
deploy-docs.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
name: Update Swap SDK Docs
on:
push:
paths:
- README.md
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
git config --global user.email "62588539+javeoff@users.noreply.github.com"
git config --global user.name "Daniil Jave"
- name: Clone .github repository
run: |
rm -rf .github
git clone "git@github.com:cryptoscan-pro/app-web.git" .github
- name: Copy README.md to destination
run: |
cp README.md .github/docs/swap-sdk.md
- name: Commit and push changes
run: |
cd .github
git add .
git commit -m "feat: update @cryptoscan/swap-sdk docs"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Clean up
run: |
cd ..
rm -rf .github
- name: Success message
run: echo "README.md copied into .github/docs/swap-sdk.md"