Skip to content

Remove *all* @types/ devdependencies before build #43

Remove *all* @types/ devdependencies before build

Remove *all* @types/ devdependencies before build #43

Workflow file for this run

name: deploy-vue
on:
push:
branches:
- deploy
paths:
- 'packages/vue/**'
- '.github/workflows/deploy-vue.yml'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was triggered by a ${{ github.event_name }} on commit ${{ github.SHA }}"
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Upload to DO
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DO_SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- run: npm install -g yarn@1.22.17 # version? 1.22.17 -> 1.22.19 current
- run: npm install -g lerna@3.22.1 # version? 3.22.1 -> 6.6.2 current
- run: npm install -g typescript@4.5.5 # version? 4.5.5 -> 5.1.3 current
- name: Build
run: |
lerna bootstrap
printf "${{ secrets.VUE_ENV }}" > ./packages/vue/.env.production
cd ./packages/express
yarn remove $(yarn list --depth=0 --pattern="@types/*" --silent | awk '{print $2}' | tr '\n' ' ')
cd ../..
yarn build
- name: Deploy /vue
run: |
vcount=$(ssh ${{ secrets.DO_USERNAME }}@eduquilt.com ls -1v /home/skuilder/dist/vue/ | tail -n1)
ssh ${{ secrets.DO_USERNAME }}@eduquilt.com mkdir /home/skuilder/dist/vue/$(($vcount+1))
rsync -rl ./packages/vue/dist/ ${{ secrets.DO_USERNAME }}@eduquilt.com:/home/skuilder/dist/vue/$(($vcount+1))
ssh ${{ secrets.DO_USERNAME }}@eduquilt.com ln -sfn /home/skuilder/dist/vue/$(($vcount+1)) /home/skuilder/www
# todo: toss a buildinfo.md file into the (vcount+1) folder, linking PR, listing time, logging build errors, etc