diff --git a/.github/workflows/deployment1.yml b/.github/workflows/deployment1.yml new file mode 100644 index 0000000..f9af498 --- /dev/null +++ b/.github/workflows/deployment1.yml @@ -0,0 +1,31 @@ +name: "SWD Deployment Notes" + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 16.x + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: "npm" + cache-dependency-path: package-lock.json + - name: Install dependencies + run: npm install + - name: Build file + run: npm run build + + - name: Deploy production to Netlify + uses: South-Paw/action-netlify-deploy@v1.2.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} + netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} + build-dir: "./build" + comment-on-commit: false diff --git a/.github/workflows/deployment3.yml b/.github/workflows/deployment3.yml new file mode 100644 index 0000000..c01458c --- /dev/null +++ b/.github/workflows/deployment3.yml @@ -0,0 +1,31 @@ +name: "SWD Deployment 1" + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 16.x + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: "npm" + cache-dependency-path: package-lock.json + - name: Install dependencies + run: npm install + - name: Build file + run: npm run build + + - name: Deploy production to Netlify + uses: South-Paw/action-netlify-deploy@v1.2.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} + netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} + build-dir: "./build" + comment-on-commit: false diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..eb4d9d5 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test