From 47eb2f0a7823f0c17aedc1b805c3a4edfe4372d9 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 27 Jan 2022 14:19:51 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a8c3cf1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build example page + +on: + workflow_dispatch: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Build assets + run: | + npm install + npm run build --if-present + + - name: Build GitHub Pages + # You may pin to the exact commit or the version. + # uses: crazy-max/ghaction-github-pages@a117e4aa1fb4854d021546d2abdfac95be568a3a + uses: crazy-max/ghaction-github-pages@v2.6.0 + with: + build_dir: dist + jekyll: false