Skip to content

add artifact upload/download #18

add artifact upload/download

add artifact upload/download #18

Workflow file for this run

name: Test and Deploy
on:
pull_request:
branches: [ main ]
push:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: Cypress Run
uses: cypress-io/github-action@v6
with:
project: .
browser: chrome
build: npm run build
start: npm run dev
wait-on: "http://localhost:3000"
- name: Upload Build Artifact
uses: actions/upload-artifact@master
with:
name: app-build
path: ./out
deploy:
runs-on: ubuntu-22.04
needs: test
steps:
- name: Download Build Artifact
uses: actions/download-artifact@master
with:
name: app-build
path: .out/
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- run: aws s3 sync ./out s3://mchewittwedding.com