Use custom vite config when running build. #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '!*' | |
pull_request: | |
branches: | |
- main | |
name: main | |
jobs: | |
update_github_pages: | |
name: Update github pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run lint | |
run: | | |
set -e | |
npm ci | |
npm run lint | |
- name: Run build | |
run: npm run build | |
- name: Publish ghpages branch | |
if: github.ref == 'refs/heads/main' | |
run: | | |
set -e | |
mv dist .. | |
git checkout --orphan ghpages | |
git reset --hard | |
rm -Rf node_modules | |
cp -R ../dist/* . | |
git add . | |
git status | |
git config --global user.name 'Dirk Lemstra' | |
git config --global user.email '[email protected]' | |
git commit -m "Updated GitHub pages" | |
git push --force origin ghpages |