-
-
Notifications
You must be signed in to change notification settings - Fork 88
58 lines (49 loc) · 1.55 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
# we need full git history for article dates
fetch-depth: 0
- name: Setup Haxe
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.3.5
# we are using this version in order to build vscode-textmate
- name: Setup Node
uses: actions/setup-node@v1
- name: Install
# at some point all npm needs to be in package.json
run: |
npm install
npm install -g [email protected]
npm install -g [email protected]
haxelib install CodeCookBook-neko.hxml --always --quiet
haxelib install highlighting.hxml --always --quiet
haxelib list
- name: Check out gh-pages branch
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: ./output
fetch-depth: 0
- name: Prepare output directory
run:
rm -r ./output/*
- name: Generate website
run: |
haxe CodeCookBook-neko.hxml
haxe highlighting.hxml
- name: Deploy to gh-pages branch
if: github.ref == 'refs/heads/master'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Deploy to GitHub Pages from $GITHUB_SHA"
git push
working-directory: ./output