-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (64 loc) · 2.26 KB
/
on-release.yaml
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
name: Create release from tag
on:
repository_dispatch:
types: [vyxal3-release]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
id-token: write
pages: write
# Allow one concurrent deployment
concurrency:
group: "release"
cancel-in-progress: true
jobs:
# This goes in the website
release:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
- name: Clone vyxal.github.io
run: git clone https://github.com/Vyxal/vyxal.github.io.git
- name: Install build dependencies
working-directory: ./vyxal.github.io
run: npm install
- name: Compile in archive mode
working-directory: ./vyxal.github.io
run: npx webpack --mode production --env vy-archive=vyxal --progress
- name: Clone the Vyxal repository
working-directory: ./vyxal.github.io
run: git clone https://github.com/Vyxal/Vyxal.git -b ${{github.event.client_payload.tag}}
- name: Compile Vyxal
working-directory: ./vyxal.github.io/Vyxal/
run: ./mill js.fullLinkJS
- name: Generate theseus data
working-directory: ./vyxal.github.io/Vyxal/
run: ./mill jvm.theseus
- name: Move everything into the right places
run: |
mv -v vyxal.github.io/Vyxal/pages/ vyxal.github.io/dist/vyxal
mv vyxal.github.io/dist/ ./${{github.event.client_payload.tag}}
rm -rfd vyxal.github.io
- name: Update versions.json
run: python helpers/update_versions_files.py ${{github.event.client_payload.tag}}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Push new version files.
- name: Upload built HTML
uses: actions/upload-pages-artifact@v1
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1