Skip to content

Hopefully fixes deploy #11

Hopefully fixes deploy

Hopefully fixes deploy #11

Workflow file for this run

name: Deploy code
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Upgrade NPM
run: npm install -g npm
- name: Install NPM Dependencies
run: npm ci
- name: Create iso placeholder
run: touch rootfs.iso9660
- name: Compile
run: npx vite build --base=/dm-playground
env:
VITE_ISO_URL: https://spacestation13.github.io/dm-playground-linux/rootfs.iso9660
- name: Create workdir
run: |
git fetch origin dist
git worktree add --detach $HOME/distbranch origin/dist
cd $HOME/distbranch
git checkout --orphan tmp-deploy
touch .nojekyll
- name: Copy files
run: |
cp $GITHUB_WORKSPACE/dist/* . -R
- name: Deploy to Github
run: |
cd $HOME/distbranch
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Update dist"
git pull --rebase origin dist
git push origin HEAD:dist --force