-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (40 loc) · 1.06 KB
/
deploy.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
name: Deploy updated website
on:
push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout gbdev/gbadev.net
uses: actions/checkout@v2
with:
repository: gbdev/gbadev.net
path: folder/repo
- name: Checkout gbdev/gbadev.net master
uses: actions/checkout@v2
with:
repository: gbdev/gbadev.net
ref: master
path: folder/build
- uses: actions/setup-node@v1
with:
node-version: '16'
- working-directory: folder/
run: |
cd repo
npm install -g yarn
yarn install
yarn docs:build
mkdir dist
cp docs/.vuepress/dist/* dist/ -r
cp CNAME dist/
cd ..
cp -a repo/dist/. build/
cd build
mkdir -m 700 ~/.ssh
echo "${{ secrets.SSH_KEY_SECRET }}" > ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519
git config --local user.name "GitHub Action"
git config --global user.email "[email protected]"
git add .
git commit -m "Update build" && git push || :