-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (40 loc) · 1.24 KB
/
publish.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
# This is a basic workflow to help you get started with Actions
name: Publish
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: githubio_source
- name: Checkout SLDN
uses: actions/checkout@v2
with:
repository: softlayer/softlayer.github.io
path: softlayer.github.io
ssh-key: ${{secrets.SLDN_SSHKEY}}
- name: Build Hugo
run: |
pwd
cd githubio_source
./bin/hugo -d ../softlayer.github.io -v
- name: Publish
run: |
pwd
date=`date +%s`
cd softlayer.github.io
git fetch --prune --unshallow
git config --local user.email "[email protected]"
git config --local user.name "SLDN"
git checkout -b ${date}
git add --all
git status
git commit --message="`date` Release"
git push origin ${date}
git request-pull ${date} https://github.com/softlayer/softlayer.github.io master