diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 81102c03..57bec41c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,9 +1,16 @@ -name: Node.js CI +name: Build & Deploy -on: [push] +on: + push: + branches: + - master + workflow_dispatch: jobs: build: + permissions: + pages: write + contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -13,9 +20,8 @@ jobs: - run: yarn install --no-progress --frozen-lockfile - run: yarn test - run: yarn build - - name: Deploy to https://tyrasd.github.io/overpass-turbo/ - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + - name: Deploy to https://${{ github.actor }}.github.io/${{ github.event.repository.name }}/ uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + publish_dir: dist