update program #132
This file contains hidden or 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 to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| build: | |
| name: Build Docusaurus | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Set Yarn to the correct version | |
| run: corepack prepare yarn@4.7.0 --activate | |
| - name: Restore Yarn Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .yarn/cache | |
| .yarn/unplugged | |
| key: yarn-cache-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| yarn-cache-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build website | |
| run: yarn build | |
| - name: Upload Build Artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: build | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |