fix: build failure #175
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 | |
| on: | |
| push: | |
| branches: main | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: github-pages | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Generate Schedule Json | |
| uses: CCIP-App/schedule-json-generator-action@v2 | |
| with: | |
| gcp-api-key: ${{ secrets.GCP_API_KEY }} | |
| spreadsheet-key: "1XWZp_U8orXn0RPpb18xG93d0eu6SzWfyLDeaBNhfJn8" | |
| default-avatar: "https://sitcon.org/2022/imgs/deafult_avatar.jpg" | |
| avatar-base-url: "https://sitcon.camp/2024/speakers/" | |
| output-path: ./public/schedule.json | |
| - name: Build | |
| run: pnpm build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| force_orphan: true | |
| - name: Trigger workflow in other repo | |
| uses: actions/github-script@v6 | |
| with: | |
| github-token: ${{ secrets.GHA_WORKFLOW_TRIGGER }} | |
| script: | | |
| const result = await github.rest.actions.createWorkflowDispatch({ | |
| owner: 'sitcon-tw', | |
| repo: 'camp', | |
| workflow_id: 'updateSubmodules.yml', | |
| ref: 'gh-pages' | |
| }) | |
| console.log(result) |