-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.07 KB
/
deploy.yml
File metadata and controls
45 lines (40 loc) · 1.07 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
name: Deploy
on:
push:
branches:
- source
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.17.0]
ruby-version: [3.3.5]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: prepare build environment
env:
GH_ACTION_DEPLOY_KEY: ${{secrets.GH_ACTION_DEPLOY_KEY}}
run: |
mkdir -p ~/.ssh/
echo "$GH_ACTION_DEPLOY_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
git config --global user.name 'chaosky'
git config --global user.email 'chaosky.me@gmail.com'
git submodule update --init
npm install hexo-cli -g
npm install
- name: deploy to github
run: |
hexo d -g
env:
CI: true