-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (52 loc) · 1.54 KB
/
deployment.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
50
51
52
53
54
55
name: deployment
on:
push:
branches:
- main
- master
env:
deploy_key: ${{ secrets.TEST_KEY }}
jobs:
# tests:
# if: startsWith(github.event.head_commit.message, 'deploy:')
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-node@v1
# with:
# node-version: '20.x'
# - name: Test Build
# run: |
# yarn install
# yarn build
deployment:
# if: startsWith(github.event.head_commit.message, 'deploy:')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "16.x"
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- name: docusaurus deploy
env:
USE_SSH: true
GIT_USER: material-table-core-worker
run: |
yarn install
yarn build
cd build
git config --global user.email "[email protected]"
git config --global user.name "material-table-core-worker"
echo "set git config"
git init -b main
echo "init git"
echo "deploy_key: $GIT_USER"
git remote add upstream https://[email protected]/material-table-core/material-table-core.github.io
echo "add upstream"
git add .
git commit -m "deploy: ${{ github.event.head_commit.message }}"
echo "commit"
git push upstream main --force