Build and pages deploy #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |