-
Notifications
You must be signed in to change notification settings - Fork 6
191 lines (169 loc) · 5.11 KB
/
website.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: Deploy LiaScript-Web-Site to Pages
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
hugo:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.132.2
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Install PostCSS, Tailwind and Autoprefixer
run: npm install postcss postcss-cli tailwindcss autoprefixer
- name: Install Python
run: sudo apt-get install python3
- name: Build World-Map
run: "cd world-map && python3 generate.py"
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: "npm run build"
- name: List contents of public directory
run: ls -la $(pwd)/public
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: public
path: ./public
liascript:
runs-on: ubuntu-latest
steps:
- name: Set ELM_HOME
run: echo "ELM_HOME=${GITHUB_WORKSPACE}/.elm" >> $GITHUB_ENV
# build LiaScript
- name: LiaScript - download
run: git clone --branch development https://github.com/LiaScript/LiaScript.git
- name: LiaScript - prebuild
run: |
cd LiaScript
npm install
npm run prebuild
- name: LiaScript - patches
run: |
cd LiaScript
git submodule update --init --recursive
cd patches
make
cd ..
rm -rf elm-stuff .parcel-cache
- name: LiaScript - build
run: |
cd LiaScript
make all2 KEY="${{ secrets.RESPONSIVEVOICE_KEY }}"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: course
path: ./LiaScript/dist
liascript-nightly:
runs-on: ubuntu-latest
steps:
- name: Set ELM_HOME
run: echo "ELM_HOME=${GITHUB_WORKSPACE}/.elm" >> $GITHUB_ENV
# build LiaScript
- name: LiaScript - download
run: git clone --branch feat/minimizeNavigation https://github.com/LiaScript/LiaScript.git
- name: LiaScript - prebuild
run: |
cd LiaScript
npm install
npm run prebuild
- name: LiaScript - patches
run: |
cd LiaScript
git submodule update --init --recursive
cd patches
make
cd ..
rm -rf elm-stuff .parcel-cache
- name: LiaScript - build
run: |
cd LiaScript
make all2 KEY="${{ secrets.RESPONSIVEVOICE_KEY }}"
rm dist/sw.js
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: nightly
path: ./LiaScript/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs:
- hugo
- liascript
- liascript-nightly
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout gh-pages branch
run: |
git fetch origin gh-pages
git checkout gh-pages || git checkout --orphan gh-pages
- name: Download Website
uses: actions/download-artifact@master
with:
name: public
path: public
- name: Extract Website Artifact
run: |
mkdir -p public
tar -xvf public/artifact.tar -C public
rm public/artifact.tar
- name: Download LiaScript
uses: actions/download-artifact@master
with:
name: course
path: public/course
- name: Extract LiaScript Artifact
run: |
mkdir -p public/course
tar -xvf public/course/artifact.tar -C public/course
rm public/course/artifact.tar
- name: Download LiaScript Nightly
uses: actions/download-artifact@master
with:
name: nightly
path: public/nightly
- name: Extract LiaScript-Nightly Artifact
run: |
mkdir -p public/nightly
tar -xvf public/nightly/artifact.tar -C public/nightly
rm public/nightly/artifact.tar
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
destination_dir: docs
publish_branch: gh-pages