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,56 @@ 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"
3239 APP_VERSION : ${{ github.ref_name }}
3340 steps :
34- - uses : actions/checkout@v2
35- - uses : actions/setup-java@v3
41+ - name : Checkout code
42+ uses : actions/checkout@v4
43+
44+ - name : Set up Java
45+ uses : actions/setup-java@v3
3646 with :
3747 distribution : ' temurin'
3848 java-version : ' 17'
39- - name : Setup Gradle
49+
50+ - name : Set up Gradle
4051 uses : gradle/actions/setup-gradle@v3
4152
42- - run : ./gradlew jvmJar
53+ - name : Build JAR
54+ run : ./gradlew jvmJar
4355
44- -
uses :
hydraulic-software/conveyor/actions/[email protected] 56+ - name : Build desktop distributions
57+ uses :
hydraulic-software/conveyor/actions/[email protected] 4558 with :
4659 command : make site
4760 signing_key : ${{ secrets.SIGNING_KEY }}
4861 agree_to_license : 1
4962 cache_key : conveyor-${{ matrix.os }}-${{ matrix.arch }}
5063
51- - uses : actions/upload-artifact@v4
52- with :
53- name : download-page
54- path : output
55- retention-days : 1
64+ - name : Extract download page files from output
65+ run : |
66+ mkdir -p pages_output/download
67+ mv output/download.html pages_output/download/index.html
68+ mv output/icon.png pages_output/download
69+
70+ - name : Upload artifacts to Github Release
71+ env :
72+ GH_TOKEN : ${{ github.token }}
73+ run : gh release upload "$GITHUB_REF_NAME" output/* --clobber
5674
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
7075 - name : Setup Pages
7176 uses : actions/configure-pages@v3
77+
7278 - name : Upload artifact
73- uses : actions/upload-pages-artifact@v1
79+ uses : actions/upload-pages-artifact@v3
7480 with :
75- path : ' .'
81+ path : pages_output
82+
7683 - name : Deploy to GitHub Pages
7784 id : deployment
78- uses : actions/deploy-pages@v2
85+ uses : actions/deploy-pages@v4
0 commit comments