diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 000000000..46e344c49 --- /dev/null +++ b/.github/workflows/action.yaml @@ -0,0 +1,35 @@ +name: Deploy function to lambda + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install Libraries + run: | + cd function + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt -t .;fi + + - name: Create zip bundle + run: | + cd function + zip -r ../${{ github.sha }}.zip . + + - name: Archive Artifact + uses: actions/upload-artifact@v2 + with: + name: zipped-bundle + path: ${{ github.sha }}.zip diff --git a/.github/workflows/init.yaml b/.github/workflows/init.yaml deleted file mode 100644 index 95482ee7a..000000000 --- a/.github/workflows/init.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# This is a placeholder so actions won't default to a getting started page - -name: Placeholder - -on: push - -jobs: - init: - runs-on: ubuntu-latest - steps: - - name: Run a one-line script - run: echo Hello, world!