-
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 1.93 KB
/
gh-pages.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: gh-pages
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
timeout-minutes: 240
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
channel: 'nightly-2024-10-07'
components: 'clippy,rust-src,rustfmt'
targets: 'wasm32-unknown-unknown'
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.100-preview.1.24101.2'
- uses: actions/setup-node@v4
with:
node-version: 21
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-go@v5
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: texlive-xetex pandoc fonts-nanum-coding
version: 1.0
- run: pwsh scripts/init.ps1
- run: pwsh scripts/publish.ps1
- uses: actions/upload-artifact@v4
with:
name: gh-pages
path: dist
retention-days: 30
push:
needs: build
timeout-minutes: 60
runs-on: ubuntu-latest
env:
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: gh-pages
path: gh-pages
- id: hash
run: echo "::set-output name=hash::$(git rev-parse HEAD)"
- uses: peaceiris/actions-gh-pages@v4
if: ${{ steps.hash.outputs.hash != github.event.before }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: gh-pages
- uses: actions/setup-node@v4
with:
node-version: 21
- if: ${{ steps.hash.outputs.hash != github.event.before }}
run: pwsh gh-pages/scripts/publish-fleek.ps1