-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (53 loc) · 1.47 KB
/
build.yml
File metadata and controls
56 lines (53 loc) · 1.47 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
51
52
53
54
55
56
name: build
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: git fetch
run: git fetch
- name: checkout www
run: git checkout -t origin/www
- name: ensure pull
run: git pull
- name: return to master
run: git checkout master
- name: Install leiningen
run: wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein && chmod +x lein && sudo mv lein /usr/local/bin/lein
- name: Install dependencies
run: lein deps
- name: Build site
run: ./build.sh https://sourceless.org
- name: git reset www
run: git reset www
- name: delete non-dist folders
run: ls | grep -v dist | xargs rm -r
- name: pull contents out of dist
run: cp -r dist/* .
- name: delete unused stuff
run: |
rm -r dist
rm -r .github
- name: git add .
run: git add .
- name: checkout www
run: git checkout www
- name: git status
run: git status
- name: Set git user
run: |
git config --local user.email "bot@sourceless.org"
git config --local user.name "Site Builder Bot"
- name: commit
run: git commit -m "www-build-$GITHUB_RUN_NUMBER"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: www