name: ci on: push: branches: - "main" jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [18.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: "npm" - run: npm install - run: npm run build --if-present docker: needs: [build] runs-on: ubuntu-latest steps: - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v2 with: push: true tags: yoshiunfriendly/frontend-hideyoshi.com:latest run-dispatcher: needs: docker runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Runs Infra-Hideyoshi.com Deployment Dispatcher run: | curl -X POST https://api.github.com/repos/HideyoshiNakazone/infra-hideyoshi.com/dispatches \ -H 'Accept: application/vnd.github.everest-preview+json' \ -u ${{ secrets.ACTIONS_KEY }} \ --data '{"event_type": "refresh-deployments", "client_payload": { "deployments": "frontend-deployment" }}'