feat: update schedule.json #167
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: 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) |