Skip to content

Add auto-save when before unload is triggered (#19) #47

Add auto-save when before unload is triggered (#19)

Add auto-save when before unload is triggered (#19) #47

Workflow file for this run

name: deploy
on:
push:
branches:
- main
env:
FORCE_COLOR: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-install
- name: Get git commit
id: git-commit
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> "$GITHUB_OUTPUT"
- run: pnpm lint
- run: pnpm build
env:
VITE_APP_VERSION: ${{ steps.git-commit.outputs.SHORT_SHA }}
VITE_DEMO_MODE: true
VITE_IMPRINT_URL: ${{ secrets.IMPRINT_URL }}
VITE_PRIVACY_URL: ${{ secrets.PRIVACY_URL }}
- run: cp ./dist/index.html ./dist/404.html
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./dist"
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: prod
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4