Skip to content

Commit

Permalink
chore: updated script deploy command
Browse files Browse the repository at this point in the history
  • Loading branch information
agliga committed Aug 29, 2024
1 parent 9630358 commit e0d8da9
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:

jobs:
# Build job
build:
deploy:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: release
Expand All @@ -43,27 +43,12 @@ jobs:
node-version: '18.x'
- run: npm i
- run: npm run build
- run: npm run deploy
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
- run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Deployment job
deploy:
if: github.ref == 'refs/heads/master'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
release:
runs-on: ubuntu-latest
if: "${{ github.repository_owner == 'ebay' && github.event_name == 'push' }}"
Expand Down

0 comments on commit e0d8da9

Please sign in to comment.