diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ca24797..cacb7377 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,11 @@ name: CI on: [push] +concurrency: + group: "pages" + cancel-in-progress: false + + jobs: lint: runs-on: ubuntu-latest @@ -46,3 +51,32 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx semantic-release + + build: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: 22 + - run: npm i + - run: npm run build + - run: rm -rf node_modules/ + - uses: actions/upload-pages-artifact@v3 + with: + path: ./ + + deploy: + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/main' + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4