Skip to content

Commit

Permalink
build: deploy to gh-pages branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokaiser committed Feb 14, 2024
1 parent c0dd6b2 commit 081d959
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ on:
push:
branches: ['main']

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -24,16 +19,8 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/upload-pages-artifact@v3
- uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
path: ./dist

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit 081d959

Please sign in to comment.