diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..22d17082 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,62 @@ +name: Build and Deploy + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Use Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Build React app + run: npm i + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + with: + name: build-artifacts + path: ./ + + config: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download build artifacts + uses: actions/download-artifact@v3 + with: + name: build-artifacts + + - name: Install dependencies + run: mkdir build2 + + - name: Build React app + run: cd build2 && echo "hello" > test1.txt + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build-artifacts + path: build1 + config1: + runs-on: ubuntu-latest + needs: config + + steps: + - name: Download build artifacts + uses: actions/download-artifact@v3 + with: + name: build-artifacts + + - name: Install dependencies + run: ls +