From f4074ef69cb58d3e448746cc068e23cbc95b482f Mon Sep 17 00:00:00 2001 From: Felix P Date: Wed, 19 Jun 2024 18:07:35 +0200 Subject: [PATCH] Use CI --- .github/workflows/build-test.yml | 49 ++++++++++++++++++++++++++++++ .github/workflows/github-pages.yml | 6 +++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000..45aa72fc --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,49 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Swag Labs Sample App Workflow + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./ + env: + BUILD_PREFIX: true + IS_MAIN: ${{ github.ref == 'refs/heads/main' }} + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} + SCREENER_API_KEY: ${{ secrets.SCREENER_API_KEY }} + steps: + - uses: actions/checkout@v2 + + - name: Build + uses: actions/setup-node@v2 + with: + node-version: '14.x' + + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Build site + env: + CI: false + run: | + ls + npm ci + npm run build + + - name: Build storybook + env: + CI: false + run: | + ls + npm run build.storybook diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 6c8c6c4b..ed6b4384 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -23,12 +23,16 @@ jobs: with: node-version: '14.x' + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Build site env: CI: false run: | ls - npm install + npm ci npm run build - name: Build storybook