Skip to content

Build and pages deploy #7

Build and pages deploy

Build and pages deploy #7

name: Build and pages deploy
on:
workflow_run:
workflows:
- Lint and test
types:
- completed
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages-deploy'
cancel-in-progress: true
jobs:
build-and-pages-deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build and pages deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
- name: Build
run: npm run build
env:
PUBLIC_BASE_PATH: /${{ github.event.repository.name }}/
- name: Setup pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './build/client/'
- name: Pages deploy
id: deploy
uses: actions/deploy-pages@v4