diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5ae3ff4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy + +concurrency: + group: deploy-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - "main" + +jobs: + stapler: + name: "Deploy to Stapler" + runs-on: ubuntu-latest + if: ${{ vars.STAPLER_TARGET != '' }} + steps: + - name: Compress production files + run: tar -czf /tmp/dist.tar.gz . + - name: Upload to Stapler server + run: | + curl -s -X PUT --data-binary "@/tmp/dist.tar.gz" \ + -H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \ + ${{ vars.STAPLER_CURL_ARGS }} \ + ${{ vars.STAPLER_TARGET }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index b495137..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Lint - -on: [push] - -jobs: - eslint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install modules - run: npm ci - - name: Run ESLint - run: npm run lint