Skip to content

script、script async 和 script defer 的区别 #4

script、script async 和 script defer 的区别

script、script async 和 script defer 的区别 #4

Workflow file for this run

name: Deploy static content to Pages
on:
issues:
types:
- opened
- edited
- closed
- reopened
- labeled
- unlabeled
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
ISITE_VERSION: v0.1.3
ZOLA_VERSION: v0.17.2
USER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate markdown
run: |
gh release download $ISITE_VERSION --repo kemingy/isite -p '*Linux_x86_64*' --output isite.tar.gz
tar zxf isite.tar.gz && mv isite /usr/local/bin
isite generate --user $USER --repo $REPO
gh release download $ZOLA_VERSION --repo getzola/zola -p '*linux*' --output zola.tar.gz
tar zxf zola.tar.gz && mv zola /usr/local/bin
cd output && zola build --base-url $BASE_URL
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'output/public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3