-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.21 KB
/
deploy.yml
File metadata and controls
50 lines (44 loc) · 1.21 KB
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
name: Build and deploy an updated version of the website
on:
push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout CoderBotOrg/docs
uses: actions/checkout@v2
with:
repository: CoderBotOrg/docs
path: folder/repo
lfs: true
- name: Checkout CoderBotOrg/docs
uses: actions/checkout@v2
with:
repository: CoderBotOrg/docs
ref: master
path: folder/build
lfs: true
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install npm dependencies
working-directory: folder/repo/
run: |
npm install
- working-directory: folder/
run: |
cd repo
npm run build
mkdir dist
cp pages/.vuepress/dist/* dist/ -r
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 "support@coderbot.org"
echo "docs.coderbot.org" > CNAME
git add .
git commit -m "Update build" && git push || :