diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 072a01caf..8e03be101 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,28 +1,35 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Node.js CI +name: Compile on: push: - branches: [ master ] + branches: + - master pull_request: - branches: [ master ] jobs: - build: - + test: + name: Compilation Test runs-on: ubuntu-latest - strategy: - matrix: - node-version: [15.x] - steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Setup NodeJS uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node-version }} + node-version: 15.x - run: yarn - run: yarn compile + push: + name: Launch the compiler + needs: test + if: ${{ github.event_name == 'push' }} + runs-on: ubuntu-latest + steps: + - name: CUrl to the compiler + run: | + curl -XPOST -H 'Accept: application/vnd.github.everest-preview+json' -H "Authorization: Bearer $PAC" -d '{"event_type": "webhook"}' 'https://api.github.com/repos/tcgdex/compiler/dispatches' + env: + PAC: ${{ secrets.PAC }}