From 85fde7399d6bdf7738fee5805c912cf41bdebfe4 Mon Sep 17 00:00:00 2001 From: Max Patiiuk Date: Sat, 9 Sep 2023 21:17:42 -0700 Subject: [PATCH] ci: Add GitHub pages autodeploy --- .github/workflows/build.yaml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/build.yaml 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