From 0301e9a1cc8d593643a8c8327e15a5cd03cae02d Mon Sep 17 00:00:00 2001 From: Aleksandr Smyshliaev Date: Sat, 22 Jun 2024 00:40:07 +0400 Subject: [PATCH] gh-pages action --- .github/workflows/main.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4465923 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +name: Test and deploy +on: + push: + branches: [main] + +jobs: + deploy: + concurrency: + group: "pages" + cancel-in-progress: true + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: 'npm' + cache-dependency-path: 'package-lock.json' + - name: install and build + run: | + npm install + npm run build + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist