From d0fe5716c3f8f4ae7e1bf95f271f0c3bcc8cc228 Mon Sep 17 00:00:00 2001 From: Jonty Wareing Date: Sat, 16 Dec 2023 16:57:25 +0000 Subject: [PATCH] Fix perms, use workflow filter, add manual trigger (#647) --- .github/workflows/node.js.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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