-
Notifications
You must be signed in to change notification settings - Fork 27
65 lines (56 loc) · 1.78 KB
/
compile.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
name: Cloudflare Pages Deploy
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
deployments: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Setting up Haxe (for api docs)
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.2.5
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Haxelib dependencies
run: |
haxelib --global install dox 1.6.0 --quiet
haxelib --global install hxtemplo 3.2.0 --quiet
haxelib --global install hxparse 4.3.0 --quiet
haxelib --global install hxargs 4.0.0 --quiet
haxelib --global install markdown 1.1.3 --quiet
- run: npm install
- run: npm run build:full ./
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
if: github.ref == 'refs/heads/main'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: codename-website
directory: export
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Push the changes to cf-pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./export
publish_branch: cf-pages