arch: null artifacts: [] environment: REACT_APP_LINKBUCKET_URL: https://linkbucketgo.avalos.me REACT_APP_PAGINATE_LIMIT: 15 deploy: ec2-user@avalos.me folder: /var/www/linkbucketgo.avalos.me image: alpine/edge packages: - nodejs - npm - go - rsync repositories: {} secrets: - 44deb6d9-1368-429f-a180-ac8f3cf0efc6 shell: false sources: - https://git.sr.ht/~avalos/linkbucket-go#096231c36bd97886525ae5b1593d12d0d8b79d2d tasks: - setup: | cd linkbucket-go/client npm i - build-server: | cd linkbucket-go/server go mod download CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o linkbucket . - build-client: | cd linkbucket-go/client npm install --silent sudo npm install react-scripts@3.4.1 -g --silent npm run build - deploy: | # .env file should be already on the server! # systemd init file should be already on the server! sshopts="ssh -oStrictHostKeyChecking=no" createparent="sudo mkdir $folder/client" rsync --rsh="$sshopts" --rsync-path="sudo rsync" -rP ./linkbucket-go/server/linkbucket $deploy:$folder/server/ rsync --rsh="$sshopts" --rsync-path="$createparent; sudo rsync" -rP ./linkbucket-go/client/build/ $deploy:$folder/client/build/ $sshopts $deploy bash -c "'sudo service linkbucketgo restart'" triggers: []