Skip to content

Commit

Permalink
attempt to fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ji committed Sep 11, 2023
1 parent f2041bb commit 6920167
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ jobs:
run: npm install
- name: Build
run: npm run build
- name: Push dist to master branch
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
git commit -m "Add dist folder"
git push origin master
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand All @@ -56,4 +49,14 @@ jobs:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1
- name: Push offline mode to master
env:
VITE_OFFLINE_VERSION: true
run: |
npm run build
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
git commit -m "Add dist folder"
git push origin master
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ dist-ssr
*.sln
*.sw?

test/
test/

.env
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## ViralWasm-Consensus

A client-side WebAssembly pipeline for viral consensus sequence calling. To run the pipeline locally without internet, download the **offline** version of ViralWasm-Consensus. To do so, download the latest release / repository (https://github.com/Niema-Lab/ViralWasm-Consensus/archive/master.zip) and run the following command:
A client-side WebAssembly pipeline for viral consensus sequence calling.

Visit: https://niema-lab.github.io/ViralWasm-Consensus/ to run the pipeline.

To run the pipeline locally without internet, download the **offline** version of ViralWasm-Consensus. To do so, download the latest release / repository (https://github.com/Niema-Lab/ViralWasm-Consensus/archive/master.zip) and run the following command:

```python3 run_website.py```
17 changes: 10 additions & 7 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
base: '/',
plugins: [react()],
build: {
sourcemap: true,
}
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
base: env.VITE_OFFLINE_VERSION === "true" ? '/' : '/ViralWasm-Consensus/',
plugins: [react()],
build: {
sourcemap: true,
}
}
})

0 comments on commit 6920167

Please sign in to comment.