stages: - build - deploy build_static: stage: build image: node:18-alpine script: - npm ci - npx next build artifacts: paths: - out/ expire_in: 1 hour only: - devops-s3 deploy_s3: stage: deploy image: name: amazon/aws-cli:latest entrypoint: ["/bin/sh", "-c"] script: - aws s3 sync out/ s3://$(echo $S3_BUCKET | tr -d '\r\n')/ --delete --region $(echo $AWS_DEFAULT_REGION | tr -d '\r\n') only: - devops-s3