|
86 | 86 | uses: ./.github/actions/test-package |
87 | 87 | with: |
88 | 88 | package_name: scratch-gui |
| 89 | + |
| 90 | + - name: Determine GitHub Pages directory name |
| 91 | + id: branch_dir_name |
| 92 | + run: | |
| 93 | + if [ "$GITHUB_REF_NAME" == "develop" ]; then |
| 94 | + echo "result=." |
| 95 | + else |
| 96 | + echo "result=${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}" |
| 97 | + fi | tee --append "$GITHUB_OUTPUT" |
| 98 | +
|
| 99 | + - name: Deploy scratch-svg-renderer to GitHub Pages |
| 100 | + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4 |
| 101 | + with: |
| 102 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 103 | + publish_dir: ./packages/scratch-svg-renderer/playground |
| 104 | + destination_dir: "${{steps.branch_dir_name.outputs.result}}/scratch-svg-renderer" |
| 105 | + full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}" |
| 106 | + |
| 107 | + - name: Deploy scratch-render to GitHub Pages |
| 108 | + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4 |
| 109 | + with: |
| 110 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 111 | + publish_dir: ./packages/scratch-render/playground |
| 112 | + destination_dir: "${{steps.branch_dir_name.outputs.result}}/scratch-render" |
| 113 | + full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}" |
| 114 | + |
| 115 | + - name: Deploy scratch-vm to GitHub Pages |
| 116 | + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4 |
| 117 | + with: |
| 118 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 119 | + publish_dir: ./packages/scratch-vm/playground |
| 120 | + destination_dir: "${{steps.branch_dir_name.outputs.result}}/scratch-vm" |
| 121 | + full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}" |
| 122 | + |
| 123 | + - name: Deploy scratch-gui to GitHub Pages |
| 124 | + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4 |
| 125 | + with: |
| 126 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 127 | + publish_dir: ./packages/scratch-gui/build |
| 128 | + destination_dir: "${{steps.branch_dir_name.outputs.result}}/scratch-gui" |
| 129 | + full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}" |
0 commit comments