Archive update #12
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
# Simple workflow for deploying static content to GitHub Pages | |
name: Deploy static content to Pages | |
on: | |
# Runs on pushes targeting the default branch | |
# push: | |
# branches: ["master"] | |
push: | |
paths: | |
- src/website/** | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
name: GitHub Pages deployment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch repository info | |
id: repository | |
run: | | |
echo "::set-output name=name::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" | |
echo "::set-output name=url::$(echo https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git)" | |
- name: Partially clone repository | |
run: | | |
git clone --depth 1 --filter=blob:none --sparse ${{ steps.repository.outputs.url }} | |
cd ${{ steps.repository.outputs.name }} | |
git sparse-checkout set --no-cone "src/website/" | |
- name: Setup GitHub Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ${{ steps.repository.outputs.name }}/src/website | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |