From 26391e2bdd3b869346757ef984e324e0d27dfe04 Mon Sep 17 00:00:00 2001 From: x Date: Sat, 11 May 2024 18:42:59 +0300 Subject: [PATCH] feat(gh-pages): create jekyll-gh-pages.yml --- .github/workflows/jekyll-gh-pages.yml | 49 +++++++++++++++++++++++++++ vite.config.js | 3 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/jekyll-gh-pages.yml diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 0000000..cbca5d3 --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -0,0 +1,49 @@ +name: Deploy + +on: + push: + branches: + - master + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + 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: Upload production-ready build files + uses: actions/upload-artifact@v3 + with: + name: production-files + path: ./dist + + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + + steps: + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: production-files + path: ./dist + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index 3d3c929..7c159dc 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,5 +3,6 @@ import glsl from 'vite-plugin-glsl'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [glsl()] + plugins: [glsl()], + base: "/merging-webGL-and-HTML-worlds/", }); \ No newline at end of file