Skip to content

Commit 67eba84

Browse files
committed
Merge branch 'hotfix/github-actions'
2 parents 12a9be2 + a640fe2 commit 67eba84

File tree

2 files changed

+8146
-0
lines changed

2 files changed

+8146
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Site
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
cache: 'yarn'
18+
cache-dependency-path: site/_themes/yarn.lock
19+
20+
- name: Build theme with node
21+
run: |
22+
cd ${{ github.workspace }}/site/_themes
23+
yarn
24+
yarn build
25+
mv dist/js ../assets/js/themes
26+
cd ../assets/js/themes
27+
FILE=../../../_includes/themes.html
28+
echo "" > $FILE
29+
for f in *.js; do
30+
echo "<script src=/assets/js/themes/$f></script>" >> $FILE
31+
done
32+
33+
- uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: 2.6
36+
bundler-cache: true
37+
38+
- name: Build page with Jekyll
39+
run: bundle exec jekyll build
40+
41+
- name: Checkout gh-pages branch
42+
uses: actions/checkout@v3
43+
with:
44+
ref: 'gh-pages'
45+
path: './gh-pages'
46+
47+
- name: Move versions to _gh_pages
48+
run: |
49+
mv gh-pages/versions _gh_pages
50+
rm -rf gh-pages
51+
52+
- name: Deploy to GitHub Pages
53+
uses: JamesIves/[email protected]
54+
with:
55+
branch: gh-pages
56+
folder: _gh_pages

0 commit comments

Comments
 (0)