diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..4f2927f --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,34 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Typecheck + run: npx tsc + + - name: Build + 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/.gitignore b/.gitignore index 10f4253..c3b45f9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules .swc .env*.local tsconfig.tsbuildinfo +dist \ No newline at end of file