Skip to content

Commit

Permalink
修改action
Browse files Browse the repository at this point in the history
  • Loading branch information
phy committed Feb 5, 2024
1 parent b29e5ba commit 5e60838
Showing 1 changed file with 21 additions and 34 deletions.
55 changes: 21 additions & 34 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,29 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

name: ci
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
branches:
- master
- main
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

contents: write
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material==9.4.1 mkdocs-glightbox
- run: mkdocs gh-deploy --force

0 comments on commit 5e60838

Please sign in to comment.