-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.49 KB
/
build.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
name: Build
on:
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci --force
- name: Force install latest chirilang & weaving
run: |
LATEST_COMMIT=$(curl -s https://api.github.com/repos/fluff4me/chiri/commits/package | jq -r '.sha')
npm install github:fluff4me/chiri#$LATEST_COMMIT
LATEST_COMMIT=$(curl -s https://api.github.com/repos/ChiriVulpes/weaving/commits/package | jq -r '.sha')
npm install github:ChiriVulpes/weaving#$LATEST_COMMIT
- name: Calculate Run Number
env:
NUM: ${{ github.run_number }}
run: echo "BUILD_NUMBER=$(($NUM+0))" >> "$GITHUB_ENV"
- name: Build
env:
API_ORIGIN: https://api.fluff4.me/
URL_ORIGIN: https://fluff4.me/
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
BUILD_SHA: ${{ github.sha }}
run: npm run build
# - name: Cleanup
# run: rm -rf docs/testiny
- name: Prepare for GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v4
with:
fqdn: fluff4.me
target_branch: build
build_dir: docs
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}