From da5ebf714e279ba908b0183aa304e210bb439ff0 Mon Sep 17 00:00:00 2001 From: Janis Date: Tue, 26 Sep 2023 11:48:23 +0200 Subject: [PATCH] Create deploy-gh-pages --- .github/workflows/deploy-gh-pages | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/deploy-gh-pages diff --git a/.github/workflows/deploy-gh-pages b/.github/workflows/deploy-gh-pages new file mode 100644 index 0000000..db9f30c --- /dev/null +++ b/.github/workflows/deploy-gh-pages @@ -0,0 +1,51 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Cache node modules + id: cache-nodemodules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # caching node_modules + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install Dependencies + if: steps.cache-nodemodules.outputs.cache-hit != 'true' + run: | + npm ci + - name: Build + run: | + npm run build