-
Notifications
You must be signed in to change notification settings - Fork 108
60 lines (58 loc) · 1.72 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
59
60
name: CI
on:
push:
pull_request:
repository_dispatch:
workflow_dispatch:
inputs:
deploy_gh_pages:
description: "Deploy to gh_pages branch (for use in forks)"
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "latest"
- uses: krdlab/setup-haxe@v1
- name: Build Site
run: |
ls -lah
npm install
npm run build ${{ inputs.deploy_gh_pages && format('{0}', github.event.repository.name ) || '' }}
ls -lah
haxe --run RemoveRedirects
# - name: Highlighting
# run: |
# git clone --recursive https://github.com/ninjamuffin99/Highlighter
# cd Highlighter
# npm install
# node bin/highlighter.js ../out
# cd ..
- name: Deploy gh_pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: ./out
force_orphan: true
if: inputs.deploy_gh_pages == true
- name: Deploy Master
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: ./out
force_orphan: true
cname: haxeflixel.com
if: github.ref == 'refs/heads/master'
- name: Deploy Dev
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{secrets.ACCESS_TOKEN}}
publish_dir: ./out
force_orphan: true
cname: dev.haxeflixel.com
external_repository: HaxeFlixel/dev.haxeflixel.com
if: github.ref == 'refs/heads/dev'