diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f76ee89..3589c69 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,20 +1,28 @@ -name: Deploy Github pages +name: Deploy to GitHub Pages on: push: branches: - master +permissions: + contents: write jobs: - build-and-deploy: + deploy: + name: Deploy to GitHub Pages runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@v4.3.3 - env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - BRANCH: gh-pages - FOLDER: build - BUILD_SCRIPT: npm install && npm run build - + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build website + run: yarn build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + user_name: unitsvc + user_email: unitsvc@gmail.com