diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1c83179 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: 'Publish website' + +on: + push: + branches: [ main ] + +jobs: + build-and-publish: + concurrency: ci-${{ github.ref }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + + - name: Build project + run: npm run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist diff --git a/vite.config.js b/vite.config.js index 5a33944..46fb5f9 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + base: "https://bovee.github.io/cwrst/", })