forked from tegioz/sample-landscape
-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (41 loc) · 1.17 KB
/
build.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
name: Build
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on:
labels: ubuntu-latest
container:
image: public.ecr.aws/g6m3a0y9/landscape2
options: --user root
steps:
- name: Install git
run: apk add git
- name: Checkout this repository
uses: actions/checkout@v4
- name: Build landscape
run: |
landscape2 build \
--settings-file ./settings.yml \
--guide-file ./guide.yml \
--data-file ./data.yml \
--logos-path ./logos \
--output-dir /tmp/landscape
- name: Commit built landscape to build branch
run: |
git config --global safe.directory `pwd`
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git fetch origin build:build
git checkout build
git branch --set-upstream-to=origin/build build
git pull
rm -rf *
cp -R /tmp/landscape/* .
cp index.html 404.html
git add .
git commit -m "Build landscape"
git push origin build