diff --git a/.github/workflows/deploy.sh b/.github/workflows/deploy.sh new file mode 100755 index 0000000..e7d23d3 --- /dev/null +++ b/.github/workflows/deploy.sh @@ -0,0 +1,2 @@ +cp scripts/extract-meta.js build/ +tar cf artifacts.tar build \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 69719c4..2d364da 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: nin-data-lastejobb on: push: - branches: [ master ] + branches: [ master, updates ] jobs: build: @@ -18,8 +18,14 @@ jobs: - run: npm update - run: npm run download - run: npm run transform + - name: Run deployment script + run: ./.github/workflows/deploy.sh + shell: bash - name: Create release uses: ncipollo/release-action@v1 with: - artifacts: "build/*" - tag: v_${{ github.run_number }} \ No newline at end of file + artifacts: "artifacts.tar" + tag: v_${{ github.run_number }} + - name: post to slack + run: ./.github/workflows/slack.sh ${{ secrets.POST_SLACK }} + shell: bash diff --git a/.github/workflows/slack.sh b/.github/workflows/slack.sh new file mode 100755 index 0000000..bbb3acb --- /dev/null +++ b/.github/workflows/slack.sh @@ -0,0 +1 @@ +curl -X POST -H 'Content-type: application/json' --data '{"text":"deploy nin-data-lastejobb"}' $1 \ No newline at end of file