update yml #36
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 Docusaurus Blog | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 19.x | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --non-interactive | |
- name: Build | |
run: yarn build | |
# 👆 Build steps | |
- name: Setup Pages | |
uses: actions/configure-pages@v1 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# 👇 Specify build output path | |
path: build | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |