-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (49 loc) · 1.35 KB
/
nightly.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
name: Nightly builds on GitHub Pages
on:
push:
branches:
- develop
permissions:
contents: read
pages: write
id-token: write
jobs:
nightly:
name: Nightly builds on GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build moonlight
env:
NODE_ENV: production
MOONLIGHT_BRANCH: nightly
MOONLIGHT_VERSION: ${{ github.sha }}
run: pnpm run build
- name: Write ref/commit to file
run: |
cd ./dist
tar -czf ../dist.tar.gz *
cd ..
mv ./dist.tar.gz ./dist/dist.tar.gz
find ./dist -type f -not -path "./dist/files" > ./dist/files
echo "${{ github.sha }}" > ./dist/ref
echo "${{ github.ref }}" >> ./dist/ref
echo "$(date +%s)" >> ./dist/ref
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4