Skip to content

Commit

Permalink
Try to fix the deploy-master pipeline.
Browse files Browse the repository at this point in the history
Signed-off-by: wotoafagh <[email protected]>
  • Loading branch information
wotoafagh committed Aug 17, 2024
1 parent 447d6ce commit 6d8da43
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions .github/workflows/deploy-master.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
name: Build and Deploy

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4

- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Build
run: |
npm install
npm run build
- name: Build
run: |
npm install
npm run build
- name: Get commit short hash
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Post request
run: |
curl -s -X POST -k ${{ secrets.WEBHOOK_URL }}?TAG=${{ steps.vars.outputs.sha_short }} \
-H 'sudo-token: ${{ secrets.API_SUDO_TOKEN }}'
- name: Get commit short hash
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Post request
env:
API_WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
if: ${{ env.API_WEBHOOK_URL != '' && env.API_WEBHOOK_URL != null }}
run: |
curl -s -X POST -k ${{ secrets.WEBHOOK_URL }}?TAG=${{ steps.vars.outputs.sha_short }} \
-H 'sudo-token: ${{ secrets.API_SUDO_TOKEN }}'

0 comments on commit 6d8da43

Please sign in to comment.