Skip to content

chore: correct trigger for github action workflow #2

chore: correct trigger for github action workflow

chore: correct trigger for github action workflow #2

Workflow file for this run

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
# permissions on the GITHUB_TOKEN to allow deployment to GitHub Pages and for semantic-release
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance and github pages publishing
pages: write # github pages publishing
steps:
- uses: actions/checkout@v4
# https://github.com/actions/configure-pages
- uses: actions/configure-pages@v2
# https://github.com/actions/setup-node#usage
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
# https://github.com/actions/upload-pages-artifact
- uses: actions/upload-pages-artifact@v3
with:
path: "./apps/browser-example/dist/"
pages:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
# https://github.com/actions/deploy-pages & https://github.com/actions/starter-workflows/blob/main/pages/static.yml
- uses: actions/deploy-pages@v4
id: deployment
release:
needs: build
runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TODO: NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx semantic-release@24