Publish GitHub Pages site #2
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
# SPDX-FileCopyrightText: © 2022–2023 Kevin Lu | |
# SPDX-Licence-Identifier: AGPL-3.0-or-later | |
name: Publish GitHub Pages site | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: data/**/*.vector.json | |
sparse-checkout-cone-mode: false | |
- uses: actions/upload-pages-artifact@v2 | |
with: | |
path: data | |
deploy-pages: | |
needs: upload | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/deploy-pages@v2 | |
id: deployment |