-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (47 loc) · 1.27 KB
/
sgrud-pages.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: SGRUD Pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
realworld:
name: Realworld
runs-on: ubuntu-latest
steps:
- name: Install node
uses: actions/setup-node@v3
with:
node-version: latest
- name: Checkout source
uses: actions/checkout@v3
with:
path: ./source
- name: Checkout target
uses: actions/checkout@v3
with:
path: ./target
repository: sgrud/sgrud.github.io
ssh-key: ${{secrets.PAGES_DEPLOY_KEY}}
- name: Build source
working-directory: ./source
run: |
npm install
npm run build
touch ./realworld/.nojekyll
- name: Test source
working-directory: ./source
run: |
npm test
- name: Stage target
working-directory: ./source
run: |
git --git-dir ../target/.git add -Af ./realworld
- name: Push target
working-directory: ./target
run: |
git diff --cached --quiet && exit
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git commit -m ${{github.repository}}@${{github.sha}}
git push