Skip to content

Publish HTML version #8

Publish HTML version

Publish HTML version #8

Workflow file for this run

name: Publish HTML version
on:
workflow_dispatch:
env:
HAXE_VERSION: 4.3.6
PROJECT_NAME: PSliceEngine
cacheLibrariesPath: P-Slice.1.0.desktop-
PSLICE_HTML_UPLOAD_SSHKEY: ${{ secrets.PSLICE_HTML_UPLOAD_SSHKEY }}
jobs:
build:
name: Post Web version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Restore Libraries for compilation
id: load-lib-cache
uses: actions/cache@v3
with:
# not caching the bin folder to prevent asset duplication and stuff like that
key: ${{ env.cacheLibrariesPath }}
fail-on-cache-miss: true
enableCrossOsArchive: true
path: |
.haxelib/
restore-keys: |
${{ env.cacheLibrariesPath }}
- name: Compile
- name: "Compile the game"
run: haxelib run lime build html5
# setup/google-services.json
- name: Configure SSH key
run: |
umask 077;
echo $PSLICE_HTML_UPLOAD_SSHKEY | base64 -d > ./ssh_key;
sha256sum ./ssh_key;
- name: Push to GitHub
run: |
cd ./export/release/html5/bin
git init --initial-branch main
git config --local user.email "actions@github.com"
git config --local user.name "P-Slice BF"
echo "Unsetting extra headers"
git config --unset-all http.https://github.com/.extraheader || echo "Extra unset failed"
echo "Config end"
git remote add origin git@github.com:Psych-Slice/psych-slice.github.io.git
git add .
echo "Pushing"
git commit -m "Built and Pushed" || {
echo "Didn't commit anything, skipping git push."
exit 0
}
GIT_SSH_COMMAND='ssh -i ./../../../../ssh_key -o IdentitiesOnly=yes' git push --force --set-upstream origin main