diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..f3dabff2 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +name: Main + +on: + push: + branches: [main] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Installing Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "npm" + + - name: install dependencies + run: npm ci + + - name: run build + run: npm build + + - name: deploy + if: github.ref_name == 'main' + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f990c3ab..b300a4d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,14 +1,12 @@ name: Main on: - push: - branches: [main] pull_request: branches: [main] jobs: build: - name: Build + name: Test runs-on: ubuntu-latest permissions: contents: write @@ -19,7 +17,7 @@ jobs: - name: Installing Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: 22 cache: "npm" - name: install dependencies