Skip to content

Commit 6cd4c57

Browse files
committed
fix: deploy to github pages
1 parent 46bd97c commit 6cd4c57

File tree

1 file changed

+35
-21
lines changed

1 file changed

+35
-21
lines changed

.github/workflows/release.yml

+35-21
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Release
22
on:
3-
workflow_run:
4-
workflows:
5-
- Build
6-
branches:
7-
- master
8-
types:
9-
- completed
3+
# workflow_run:
4+
# workflows:
5+
# - Build
6+
# branches:
7+
# - master
8+
# types:
9+
# - completed
1010
push:
1111
tags:
1212
- "v*.*.*"
@@ -35,7 +35,7 @@ jobs:
3535
name: dot_love-${{ github.sha }}
3636
path: ${{ steps.dot_love.outputs.DOT_LOVE }}
3737
if-no-files-found: error
38-
website:
38+
webroot:
3939
needs:
4040
- dot_love # Use pre-built game.love via cachix
4141
runs-on: ubuntu-latest
@@ -48,18 +48,31 @@ jobs:
4848
with:
4949
name: bismuthsoft
5050
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
51-
- run: nix build
51+
- run: nix build .#super_rogue.web.src
5252
- run: |
53-
env | grep -o "^AWS_[^=]*"
54-
echo $AWS_ACCESS_KEY_ID | wc -c
55-
echo $AWS_SECRET_ACCESS_KEY | wc -c
56-
src=$(nix eval --raw ".#super_rogue.web.src")/
57-
dest=s3://winny-super-rogue/
58-
nix run .#ci.s5cmd -- sync --acl public-read "$src" "$dest"
59-
echo https://super-rogue.workinprogress.top/
60-
env:
61-
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
62-
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
53+
printf 'WEB_SRC=%s\n' \
54+
"$(nix eval --raw .#super_rogue.dot_love)/super_rogue.web.src \
55+
>> "$GITHUB_OUTPUT"
56+
id: web_src
57+
# cf https://github.com/actions/upload-pages-artifact/blob/main/action.yml
58+
- uses: actions/upload-pages-artifact@v4
59+
with:
60+
path: ${{ steps.web_src.outputs.WEB_SRC }}
61+
website:
62+
# cf https://github.com/actions/deploy-pages?tab=readme-ov-file#usage
63+
permissions:
64+
pages: write
65+
id-token: write
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
69+
needs:
70+
- webroot
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4
6376
linux:
6477
needs:
6578
- dot_love
@@ -85,7 +98,7 @@ jobs:
8598
build-deb: true
8699
product-name: super-rogue
87100
output-folder: ./dist
88-
- uses: actions/upload-artifact@v3
101+
- uses: actions/upload-artifact@v4
89102
with:
90103
name: dist-linux
91104
path: dist
@@ -147,7 +160,7 @@ jobs:
147160
product-website: https://super-rogue.workinprogress.top
148161
installer-languages: English.isl
149162
output-folder: "./dist"
150-
- uses: actions/upload-artifact@v3
163+
- uses: actions/upload-artifact@v4
151164
with:
152165
name: dist-windows
153166
path: dist
@@ -175,6 +188,7 @@ jobs:
175188
uses: softprops/action-gh-release@v2
176189
# if: startsWith(github.ref, 'refs/tags/')
177190
with:
191+
draft: true
178192
files: |
179193
super_rogue.love
180194

0 commit comments

Comments
 (0)