[projects] 新增项目:培养方案显示已获得学分 (#262) #58
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
# https://github.com/actions/starter-workflows/blob/main/pages/ | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch README | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
README.md | |
justfile | |
sparse-checkout-cone-mode: false | |
- uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- run: just build-for-pandoc | |
- name: Convert to HTML | |
uses: docker://pandoc/core:3 | |
with: | |
args: >- | |
build/index.md | |
--from gfm+alerts | |
--standalone | |
--output build/index.html | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./build | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |