1111
1212# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313permissions :
14- contents : read
14+ # Needed for reading repository contents (read)
15+ # and uploading assets to Github Releases (write)
16+ contents : write
17+ # Needed for deploying to GitHub Pages
1518 pages : write
19+ # Needed for getting the OIDC token for the Github Pages deployment
20+ # See https://github.com/actions/deploy-pages?tab=readme-ov-file#oidc
1621 id-token : write
1722
1823# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
@@ -25,54 +30,55 @@ jobs:
2530 # Single deploy job since we're just deploying
2631 conveyor :
2732 name : " Create desktop distributions"
28- environment : production
33+ environment :
34+ name : github-pages
35+ url : ${{ steps.deployment.outputs.page_url }}
2936 runs-on : ubuntu-22.04
3037 env :
3138 CONVEYOR_AGREE_TO_LICENSE : " 1"
32- APP_VERSION : ${{ github.ref_name }}
3339 steps :
34- - uses : actions/checkout@v2
35- - uses : actions/setup-java@v3
40+ - name : Checkout code
41+ uses : actions/checkout@v4
42+
43+ - name : Set up Java
44+ uses : actions/setup-java@v3
3645 with :
3746 distribution : ' temurin'
3847 java-version : ' 17'
39- - name : Setup Gradle
48+
49+ - name : Set up Gradle
4050 uses : gradle/actions/setup-gradle@v3
4151
42- - run : ./gradlew jvmJar
52+ - name : Build JAR
53+ run : ./gradlew jvmJar
4354
44- -
uses :
hydraulic-software/conveyor/actions/[email protected] 55+ - name : Build desktop distributions
56+ uses :
hydraulic-software/conveyor/actions/[email protected] 4557 with :
4658 command : make site
4759 signing_key : ${{ secrets.SIGNING_KEY }}
4860 agree_to_license : 1
4961 cache_key : conveyor-${{ matrix.os }}-${{ matrix.arch }}
5062
51- - uses : actions/upload-artifact@v4
52- with :
53- name : download-page
54- path : output
55- retention-days : 1
63+ - name : Extract download page files from output
64+ run : |
65+ mkdir -p pages_output/download
66+ mv output/download.html pages_output/download/index.html
67+ mv output/icon.png pages_output/download
68+
69+ - name : Upload artifacts to Github Release
70+ env :
71+ GH_TOKEN : ${{ github.token }}
72+ run : gh release upload "$GITHUB_REF_NAME" output/* --clobber
5673
57- deploy :
58- environment :
59- name : github-pages
60- url : ${{ steps.deployment.outputs.page_url }}
61- runs-on : ubuntu-latest
62- needs : [conveyor]
63- steps :
64- - name : Download a single artifact
65- uses : actions/download-artifact@v4
66- with :
67- name : download-page
68- path : download
69- - run : mv download/download.html download/index.html
7074 - name : Setup Pages
7175 uses : actions/configure-pages@v3
76+
7277 - name : Upload artifact
73- uses : actions/upload-pages-artifact@v1
78+ uses : actions/upload-pages-artifact@v3
7479 with :
75- path : ' .'
80+ path : pages_output
81+
7682 - name : Deploy to GitHub Pages
7783 id : deployment
78- uses : actions/deploy-pages@v2
84+ uses : actions/deploy-pages@v4
0 commit comments