Update .github/workflows/deploy-pages.yml #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
name: Deploy Static Pages | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: kjuly/mkdocs-material:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build static pages | |
run: ./build_to_deploy.sh | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pages | |
path: build | |
if-no-files-found: error | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
steps: | |
- name: Upload artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: pages | |
path: . | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: . | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |